Comments

Navigation:  Appendices > Macro Language > Instructions >

Comments

Previous pageReturn to chapter overviewNext page

Insert comments instructions in your code to remind yourself, and possibly other users, of what you were doing when you wrote this code. The compiler ignores comments entirely, they are solely there for the user's benefit.

 

There are 2 types of comments.

 

End of the line

End of the line comments are useful to indicate the use or meaning of the entire line. They begin with a double slash // and comment-out the rest of the line.

example : X = 5 // end of line comment

Closed

Closed comments are delimited by curly braces { and }. You can insert them anywhere in your code. They are useful to give information about a detail of a code line. For example you may use them to explain some numerical value, or what a variable stands for (although your variable names should be explicit).

example : X {the day} = 5 {Friday; closed comment}

 

 

Generally you should start writing any macro by writing the outline of what the macro is to accomplish, using pseudo-code in comments. This is a powerful way of separating the logic of your code from its implementation details.


Topic 108197 updated on 09-Jan-2003.
Topic URL: http://www.qppstudio.net/webhelp/index.html?comments2.htm