AutoPatrol, Bureaucrats, Administrators
481
edits
m (Text replacement - "^" to "{{deprecated}}") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Coding style for C and C++ = | {{deprecated}}= Coding style for C and C++ = | ||
1. Function names: each word in function name should start with capital letter. No underscores. For example: '''CreateNewUser'''. Underscores allowed in parameter handlers, which can start with '''H_''' prefix, like this: '''H_FreeDiskSpace'''. | 1. Function names: each word in function name should start with capital letter. No underscores. For example: '''CreateNewUser'''. Underscores allowed in parameter handlers, which can start with '''H_''' prefix, like this: '''H_FreeDiskSpace'''. | ||
Line 47: | Line 47: | ||
11. For type cast type name must be enclosed in brackets, without spaces. For example: '''(DWORD)x'''. | 11. For type cast type name must be enclosed in brackets, without spaces. For example: '''(DWORD)x'''. | ||
12. It is recommended to use the | 12. It is recommended to use the following typedefs as a replacement for certain system data types: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 60: | Line 60: | ||
| QWORD || instead of system's 64 bit unsigned integer | | QWORD || instead of system's 64 bit unsigned integer | ||
|} | |} | ||
= Coding style for Java = | = Coding style for Java = | ||
Line 79: | Line 78: | ||
something(); | something(); | ||
} | } | ||
</syntaxhighlight> | |||
the only exception is anonymous inner class definition, like below: | |||
<syntaxhighlight lang="java"> | |||
menuMgr.addMenuListener(new IMenuListener() { | |||
public void menuAboutToShow(IMenuManager mgr) | |||
{ | |||
fillContextMenu(mgr); | |||
} | |||
}); | |||
</syntaxhighlight> | </syntaxhighlight> | ||