Three programming naming conventions (Hungarian, CamelCase, Pascal)

1. Hungarian naming:

Use the abbreviation of the variable type for the first letter, and the English or English abbreviation of the variable for the rest. The first letter of the word is required to be capitalized.

ex: 
int iMyAge; "i" is the abbreviation of int type; 
char cMyName[10]; "c" is the abbreviation of char type; 
float fManHeight; "f" is the abbreviation of float type;

Others: 
prefix type ab by c cb cr cx,cy dw fn hil lp m_ n np ps sz w (one-to-one correspondence) 
array (Array) Boolean (Boolean) Byte (Byte) Signed character (Char) Unsigned Character (Char Byte, not many people use) Color Reference Value (ColorRef) Coordinate Difference (Length ShortInt) Double Word Function Handle (Handle) Integer Long Integer (Long Int) Long Pointer Class Member Short Int (Short Int) Near Pointer Pointer String type null-terminated string type (String with Zero End) Word

2. CamelCase:

Also called little camelCase. 
The first letter of the first word is lowercase, and the other words that follow are capitalized.

ex: 
int myAge; 
char myName[10]; 
float manHeight;

3. Pascal nomenclature:

Also known as Big CamelCase. 
Capitalize the first letter of each word.

ex: 
int MyAge; 
char MyName[10]; 
float ManHeight;

4. There are some other naming conventions, such as: underscore nomenclature.

Reprinted from https://blog.csdn.net/f_zyj/article/details/51510085

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324703136&siteId=291194637