| Log In | Not a Member? |
Contact ADC
|
|
Over the years a certain MacApp coding style has emerged. This style is maintained throughout the source code of MacApp in order to present a consistent and comfortable presentation to our developers. They gain a feeling of 'security' from this consistency. Here we present a list of the standard MacApp coding styles. This list will grow and change as time permits. Why Styles?Automated scripts are used for generating a public release of MacApp & ACS. Following these standards prevents script-busting problems from occuring.
StylesHere we present a list of the standard MacApp coding styles. This list will grow and change as time permits. Change HistoryInclude a change history. Insure that the change history uses the standard format appropriate for the type of file. For example, a C or C++ source code file should have the following form at the beginning of the source file:
There are several things to notice about this example which are important to follow when checking in your code. The placement of each item in the Change History and the use of tabs for separation are critical for the successful running of severel release preparation scipts which rely on the standard layout. The title 'Change History:' is preceeded with one tab (no spaces) and has no trailing whitespace or additional comments (the colon is the last character on the line). The date for each change notice is preceeded by two tabs and followed by one tab. The initials of the person making the change are followed by two tabs. Change comments can span multiple lines. The second and subsequent lines should be indented to align with the beginning of the comment on the first line. For ease in scanning the change history it is considered 'polite' to keep each line short enough to be fully readable when the window is sized reasonably. The Radar bug number is normally included at the beginning of a change comment. BracesAlways place beginning braces on their own line and align with the statement which begins the block.
Naming - Data MembersClass data members always start with the small letter 'f'.
Naming - Static Data MembersStatic class data members always start with the small letters 'sf'.
Naming - Global VariablesGlobal variables always start with the small letters 'g'.
But the use of globals is discouraged.
ConstAlways declare functions 'const' if at all possible.
Unused Parameters
|