Skip to topic
|
Skip to bottom
Jump:
TModeling
TModeling Web
TModeling Web Home
Changes
Notify
Index
Search
Webs
BioGeometry
Main
TModeling
TWiki
Edit
Attach
Printable
TModeling.CommentingIndividualLines
r1.1 - 16 Jun 2008 - 02:08 - Main.guest
topic end
Start of topic |
Skip to actions
*Commenting Individual Lines* --- * Avoid self-indulgent comments <verbatim> memcpy( ptrDest, ptrSrc, nBytes ); // The Pink Panther Movie Rocks !!! </verbatim> * Avoid endline comments on single lines <verbatim> memcpy( ptrDest, ptrSrc, nBytes ); // Save a copy of 1-ring vs. // Save a copy of 1-ring memcpy( ptrDest, ptrSrc, nBytes ); </verbatim> * Avoid endline comments meant to apply to multiple lines of comments <verbatim> for (currIdx = 0; currIdx <= nElems; currIdx++) // Compute min/max { ... } vs. // Compute min/max for (currIdx = 0; currIdx <= nElems; currIdx++) { ... } </verbatim> * Use endline comments to annotate data declarations <verbatim> int upperSentinel = nElems; // sentinel used to prevent sorting from running past upper end of array int lowerSentinel = 0; // sentinel used to prevent sorting from running past lower end of array </verbatim> * Use endline comments to annotate routine parameters <verbatim> bool BuildOneRing ( const TINvertex * origVertex; // IN - original vertex TINvertex * newVertex; // OUT - new vertex with valid 1-ring ) { ... } </verbatim> * Avoid using endline comments for maintenance notes <verbatim> for (i = 0; i < maxElments-1; i++) // Fixed bug #4251 on 06/15/08 (SDB) </verbatim> -- Main.ShawnDB - 16 Jun 2008
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
More topic actions
Revisions: | r1.1
|
Total page history
|
Backlinks
You are here:
TModeling
>
CommentingIndividualLines
to top
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback