Second, the naming rule:
1. Naming rules for variable names
The naming rules for ① and variables require "Hungarian law". That is, the beginning of the letter with the type of variable, the remainder of the variable in the English meaning or the abbreviation of its English meaning, as far as possible to avoid using Chinese pinyin, the first letter of the word should be capitalized.
That is: variable name = variable type + The English meaning of the variable (or abbreviation)
For a variable that is not generic, add a comment description at the time of the definition, and the variable definition can be placed at the beginning of the function as much as possible.
See table below:
BOOL (BOOL) with B opening bisparent
Byte (byte) Byflag by Start
Short (int) begins with n Nstepcount
Long (long) beginning with L Lsum
char (char) begins with C Ccount
Float (float) begins with F Favg
Double (double) with D opening Ddeta
void (void) begins with V Vvariant
unsigned short (WORD) starts with W Wcount
unsigned long (DWORD) begins with DW Dwbroad
HANDLE (HINSTANCE) begins with H Hhandle
DWORD begins with DW Dwword
LPCSTR (LPCTSTR) begins with Str strstring
With the 0 end of the string with the SZ opening szFileName
Propose and give a naming recommendation to the Technical Committee for the type of variable not given.
The basic principles for naming ② and pointer variables are:
The basic principles for a pointer variable are:
"P" + Variable type prefix + naming
such as a float* type should be expressed as Pfstat