2,599
edits
Efernandez (talk | contribs) |
Efernandez (talk | contribs) |
||
Line 203: | Line 203: | ||
/*Regular function*/ | /*Regular function*/ | ||
FunctionName(); | FunctionName(); | ||
</syntaxhighlight> | |||
=== Enumerators === | |||
Enumerators (for both scoped and unscoped enums) should be named like constants, not like macros. That is, use kEnumName not ENUM_NAME. | |||
<syntaxhighlight lang="c"> | |||
enmu class MyEnum { | |||
kFieldOne, | |||
kFieldTwo, | |||
}; | |||
</syntaxhighlight> | |||
=== Macros === | |||
Macros are all uppercase and words separated by undersclore. | |||
<syntaxhighlight lang="c"> | |||
#define MY_MACRO 5 | |||
</syntaxhighlight> | </syntaxhighlight> | ||