I. Hungarian nomenclature: [Not recommended]
The basic principle is : variable name = attribute + Type + object description, where each object name requires a clear meaning, you can take the full name of the object or part of the name. Based on principles that are easy to remember and easy to understand. It is very important to ensure the consistency of the name.
For example, if the name of the form is form, then it can be abbreviated to FRM in the nomenclature, then the full name of the variable should be frmswitchboard when the form variable is named switchboard. This makes it easy to see from the variable name that switchboard is a form, and similarly, if the variable type is a label, it should be named Lblswitchboard.
Prefix of lowercase letters commonly used in Hungarian nomenclature:
prefixType
A arrays (array)
b Boolean Value (Boolean)
by Byte (byte)
C signed character (Char)
CB unsigned character (Char Byte, not many people used)
CR Color reference value (COLORREF)
Cx,cy coordinate difference (length shortint)
DW Double Word
fn function
H Handle (handle)
I integral type
L Long int
LP Long Pointer
Members of the M_ class
n short integer (shorter int)
NP near Pointer
P Pointer
S-string
SZ null-terminated string type (string with Zero end)
W Word
Ii. Camel Nomenclature: (Camel method)
Camel-like command, as its name implies, is a mixture of uppercase and lowercase letters to form the names of variables and functions. For example:
printEmployeePaychecks ();//camel-type nomenclature [recommended]
Print_employee_paychecks ();//Underline method
The first function name uses camel-named notation-each logical breakpoint in the function name is marked with an uppercase letter;
The second function name uses the underscore method----each logical breakpoint in the function name is marked with an underscore.
Camel-style nomenclature has become more and more popular in recent years, and in many new libraries and environments like Microsoft Windows, it is well-suited to use. On the other hand, the underscore is popular after the advent of C, in many of the old Programs and UNIX environment, it is very common use.
Pascal (PASCAL) nomenclature:
Similar to the Camel name law. But the camel nomenclature is the first letter lowercase, and the Pascal nomenclature is capitalized
such as: public void DisplayInfo ();
String UserName;
Both use Pascal's nomenclature.
OK recommended Camel-style naming according to their preferences
"HTML" "11" Function name constraint specification