Difference between revisions of "Coding Style"

16 bytes added ,  18:13, 13 September 2022
m
Text replacement - "^" to "{{deprecated}}"
m (Text replacement - "^" to "{{deprecated}}")
 
(One intermediate revision by one other user 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 dollowing typedefs as a replacement for some system data types:
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 =