55
edits
m (→Control Flow) |
m (→Function Names) |
||
| Line 1: | Line 1: | ||
== | == Functions == | ||
* Public function names begin with JS_ followed by capitalized "intercaps", e.g. JS_NewObject. | * Public function names begin with JS_ followed by capitalized "intercaps", e.g. JS_NewObject. | ||
* Extern but library-private function names use a js_ prefix and mixed case, e.g. js_SearchScope. | * Extern but library-private function names use a js_ prefix and mixed case, e.g. js_SearchScope. | ||
* Most static function names have unprefixed, mixed-case names: GetChar. | * Most static function names have unprefixed, mixed-case names: GetChar. | ||
* But static native methods of JS objects have lowercase, underscore-separated or intercaps names, e.g., str_indexOf. | * But static native methods of JS objects have lowercase, underscore-separated or intercaps names, e.g., str_indexOf. | ||
* Function return types are on a separate line preceding the function name. | |||
void DoThis() { // bad | |||
... | |||
} | |||
void | |||
DoThis() { // OK | |||
... | |||
} | |||
== Other Symbols == | == Other Symbols == | ||
edits