Reddick naming convention
The Reddick naming convention was first mentioned in many books and specialist magazines in 1992 and is a guide for many programmers in naming variables . The convention makes it very easy for other programmers to understand the meaning of the variable while reading it. Variables like x, i, i1 are mentioned as an example of the necessity, the meaning of which is not evident from the name and must therefore be taken from the context.
The Leszynski naming convention (or LNC) is a variant published by Stan Leszynski specifically for use in development for Microsoft Access. Although LNC is widely used in the Microsoft Access community today and is standard in Visual Basic programming, it is not widely used in other programming languages.
Explanation
There are four modules for naming variables
[Präfix] [Typkürzel] [Basisname[Suffix]]
Explanation
Day | meaning |
---|---|
prefix | supplements the type code with additional information; it is given in lowercase letters. |
Type code | briefly referred to as “tag” in English, consists of a short sequence of letters that indicate the type of object. Lower case letters are used for the type code |
BaseName | is the otherwise common variable name such as "Calculated number" - whereby internal majorities are used here . |
suffix | contains additional information about the variable
for example Min, Max, Cnt (Count), Lim, First, Last |
Selection of possible type codes
Day | Object Type |
---|---|
bool {f, bln} | Boolean |
byte {byt} | byte |
cur | Currency |
date {dtm} | Date |
dec | Decimal |
dbl | Double |
int | Integer |
lng | Long |
obj | Object |
sng | single |
st | String |
stf | String (fixed length) |
var | Variant |
Prefixes
An indication can always be added before and after the prefix:
prefix | Object type |
---|---|
(none) | Local variable, lifetime at procedure level |
s | Local (static) variable, lifetime at program level, is declared with "Static" |
m | Private (modular) variable, lifetime at program level, is declared as "Private" |
G | Public (global) variable, lifetime at program level, is declared as "Public" |
c | Counter of an object type |
H | Pointer (handle) to a Windows object |
r | Parameter that was passed "By References" |
for example
- gintKundenID - global integer "CustomerID"
- mintUserName - private (modular) Integer "UserName"
Examples
Simple:
- boolEingabe - Boolean
- strName
- objWikiPedia
With day:
- strfName, strfTelefon, strfAdschrift, strfPlzOrt for a form for example
With suffix
- strName1, strName2, ...
- strInputCount (Count is the suffix here)
Individual evidence
- ↑ Naming Conventions for Microsoft Access (Archived Microsoft Access Content) ( Page no longer available , search in web archives ) Info: The link was automatically marked as defective. Please check the link according to the instructions and then remove this notice.