|
Topic | Date / Examples / Link to comments |
2 Keep the scripts self-documenting This does not mean putting comments on each and every statement. On the contrary, the code itself should be understandable and self-explanatory without comments wherever possible. For example the line
del F[Distribution list number] does not need the comment “Delete Distribution list number”. But in cases involving technical names del F[S004-DLISN] it is reasonable to add the comment. And in cases involving absolute coordinates (avoid them if possible), it is a must to add a comment: del #[12,74] // Delete Distribution list number Often it makes sense to add a comment about why we are doing something. This typically precedes a block of code: // Delete the fields that we moved to the main screen // Disable input for critical fields if user is not authorized In this way you can structure your script, grouping related statements together. Put a blank line before each logical group, but only one line. | Last update: July 4, 2004 |