Hungarian nomenclature
Basic principle : variable name = attribute + type + object description, where the name of each object must have a clear meaning, you can take the full name of the object name or part of the name.
A simple one-line summary: Use the lowercase letter symbol as a prefix to identify the scope and type of variables.
Commonly used lowercase prefixes
Prefix | Types of |
---|---|
a | Array |
b | Boolean |
by | Byte |
c | Signed characters (Char) |
cb | Unsigned character (Char Byte) |
cr | Color reference value (ColorRef) |
cx,cy | Coordinate difference (length ShortInt) |
dw | Double Word |
fn | function |
h | Handle |
i | Integer |
l | Long Int |
lp | Long Pointer |
m_ | Members of the class |
n | Short Int |
for example, | Near Pointer |
p | Pointer |
s | String |
sz | String with Zero End |
w | Word |
var mMyName = "Devin Xin"
Camel nomenclature: (camel method)
Mix upper and lower case letters to form the names of variables and functions.
The first letter is lowercase, followed by the first letter in uppercase.
var myName = "Devin Xin"
Pascal nomenclature
Similar to camel nomenclature. It's just that camel nomenclature is lowercase, and Pascal nomenclature is uppercase.
var MyName = "Devin Xin"