The following list is a recommended naming convention to name your variable. Naming a variable in a consistent manner will make your program more readable and let you identify the data type of the variable from his name. ATEasy uses the recommended prefixes for naming internal (variables, user-defined) data types. Use the prefix naming convention when you declare variables. Variables are also identifer and as such they also need to adhere to the ATEasy language Identifier naming rules.
Data Type |
Recommended Prefix |
Example |
AColor |
clr |
clrRed |
Afont |
font |
fontBold |
AHandle |
h |
hDriverDMM |
Any |
p |
pVar |
APicture |
pic |
picButtonOff |
APixel |
x, y, cx, cy |
xTopLeft |
Bool |
b |
bOkay |
BString |
bs |
bsText |
Byte |
uc |
ucDataByte |
Char |
c |
cChar |
Currency |
cur |
curTotalSales |
DateTime |
dtm |
dtStartDate |
DDWord |
ddw |
ddwData |
DLong |
dl |
dlLongCount |
Double |
d |
dMininum |
DWord |
dw |
dwData |
Enum type |
enum |
enumAAxisType |
Enum member |
axxx |
aaxsTypeXAxis |
Enum variable |
en |
enBorderStyle |
Float |
f |
fButtonHeight |
Long |
l |
lCount |
Object |
ob |
obButtonOnOff |
Procedure |
proc |
procCallBack |
Short |
n |
nCount |
String |
s |
sText |
Structure |
st |
stData |
Variant |
v |
vParam |
WChar |
wc |
wcLast |
Word |
w |
wIndex |
The following table lists the Type Modifier data types and the recommended prefix to use when you declare a Type Modifier as a variable. This data type is considered a Type Modifier because its basic data type is changed by adding a Type Modifier prefix before the data type prefix.
Data Type: Type Modifier |
Recommended Prefix before the Data Type Prefix |
Example |
Array |
a |
alMatrix |
Global (for public variables) |
g_ |
g_IStatus |
Member (for private variables) |
m_ |
m_nHandle |
Pointer or Var parameters |
p |
pbCancel |
Form Variable |
f_ |
f_bOK |