if ( condition )
{
// .. do something
}
bool GetPropertyWithName( string strName )
{
// .. do something
}
if ( NULL == pszAddress )
{
// .. do something
}
Coding Conventions | |||
---|---|---|---|
name | description | Usually used | examples |
flatcase | package at Java, etc. | ||
kebab-case lisp-case spinal-case caterpillar-case dash-case hyphen-case css-case | only small cases, spread with hypens | css, | kebab-case, lisp-case, spinal-case |
camelCase | variables at Java, C#, etc. | let myVariable: string | |
PascalCase CapitalCamelCase | Class | class MyClass | |
snake_case c_case | variables at Python, PHP, c, etc. | snake_case | |
UPPER_CASE_SNAKE_CASE (UPPER_CASE) MACRO_CASE | UPPER_CASE_SNAKE_CASE | ||
COBOL-CASE TRAIN-CASE | COBOL-CASE, HTTP-Header-Case | ||
undercore notation | prefixed by “_” followed by camelCase | _idUser | |
Hungarian Notation | variable names prefixed by metadata data-types which is out-dated | C++, MFC | strUsername |