Block comments preceding functions will start with in the first line. The “/*!” number of the sections should be in the same column as the “!”. Each line in the block comment should start with an asterisk (*). Each section title will be on a line by itself, followed by a colon and space. The first letter of a section’s content should be in the same column as the first letter of the section title. A blank line must separate two sections. For section 2: Parameters, list each of the parameters on a separate line followed by a colon and blank space, and a brief description of the parameter. For section 3. Creation Time and Owner, the contents may be on the same line as the section title. The date format is The date should be followed by a “YYYY.MM”. semi-colon and space, and the developer’s and/or organization’s name making the code contribution. The following is a good example of a block comment preceding a function: /*! * 1. Function Description: * Returns a string without leading/trailing spaces or tabs * Returns trimmed string * * 2. Parameters: * str: original string * s: string that has been trimmed * * 3. Creation Time and Owner: 2009.01; USC */ The following is a good example of a comment preceding code modifications within a function: /* Modification: 2015.04 * Fixed for-loop constraints to prevent infinite looping */
Block comments preceding functions will start with “/*!” in the first line. The number of the sections should be in the same column as the “!”. Each line in the block comment should start with an asterisk (*). Each section title will be on a line by itself, followed by a colon and space. The first letter of a section’s content should be in the same column as the first letter of the section title. A blank line must separate two sections. For section 2: Parameters, list each of the parameters on a separate line followed by a colon and blank space, and a brief description of the parameter. For section 3. Creation Time and Owner, the contents may be on the same line as the section title. The date format is “YYYY.MM”. The date should be followed by a semi-colon and space, and the developer’s and/or organization’s name making the code contribution. The following is a good example of a block comment preceding a function: /*! * 1. Function Description: * Returns a string without leading/trailing spaces or tabs * Returns trimmed string * * 2. Parameters: * str: original string * s: string that has been trimmed * * 3. Creation Time and Owner: 2009.01; USC */ The following is a good example of a comment preceding code modifications within a function: /* Modification: 2015.04 * Fixed for-loop constraints to prevent infinite looping */
UCC_Code_Documentation_Standards.v2.Summer2015.docx