Comments

From Pengower
Jump to: navigation, search

The top of each Action Script should contain a comment with the name of the Action Script together with any arguments being passed. When commenting arguments ensure that the following is included: Argument Name, Argument Type, Brief Description.


1 // tm OHA Case Save
2
3 // arguments OHACase entity the case to be saved
4 // NoAudit integer boolean allowing auditing to be suppressed
5 // APIUserString string Optional username for auditing for API calls


Clearly written code should be 'self' commenting, there should be no need for blocks of comments to describe what is going on. If that isn't the case, consider using more descriptive variable names, and breaking the code up into more distinct scripts.

Where comments are used, ensure they are concise.

When making code amendments ensure that you place a comment (with your name, date, brief comment and either ' - Start' or '- End') at the start and end of your changes so that it is immediately obvious what your effect on the code has been.


1
2
3 //If (id != itm["ID"])
4 // Set frm = Do Open Custom Form Params Custom Form = "Organisation "
5 // Set args = {}
6 // Add org To args
8 // Set frm[" "] = rtn[3]
9 //EndIf


See Also

Script Action Library

Comment Statement