TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  NAM#015Checked automatically with code checker

This rule is Obsolete
Synopsis:Use Pascal and Camel casing for naming indentifiers
Language:C++
Severity Level:9
Category:Naming


Description:

  • In Pascal casing the first letter of each word in an identifier is capitalized. For example, BackColor

  • In Camel casing only the first letter of the second, third, etc. word in a name is capitalized; for example, backColor.

The table below provides the casing for the most common types.

IDENTIFIERCASEEXAMPLE
ClassPascalAppDomain
Pascal with prefix "C" is allowedCAppDomain
Class data memberPascalDetectorEmulated
Pascal with prefix "m_" is allowedm_DetectorEmulated
Enum type (enumeration)PascalErrorLevel
Enum value (enumerator)Capitals with underscoresTCU_STATUS_OK
MacroCapitals with underscoresTRACE_FUNC_BEGIN
MethodPascalToString
NamespacePascalSystem.Drawing
ParametercameltypeName
StructPascalDfaParameters
Struct data memberPascalAverageFileExposed
Variable (function scope)cameldoseRate
Variable (non function scope)PascalFlatDetectorType