Adding Comments to Code

Any text after a comment is ignored and not seen as part of a programming statement. Single line comments are indicated by two forward slashes at the beginning of the comment.

Multi-line comments can be created either by a series of single line comments or by starting the comment with a forward slash and asterisk, prefacing each new line of the comment with an asterisk and then finishing the comment with an asterisk followed by a forward slash.

Either comment style can be used with OpusScript.

Using comments in your code is important for explaining what the code does. This is very useful when another user (or yourself) comes to edit the code at a later time.

Syntax:

// A single line comment

/*
* A multi-line comment
* this is still part of the comment
*/

image\Script_Button.jpgExamples