The first thing you should know is that you can insert comments into your script to describe what you are doing.
WARNING
Comment your script as much as possible. It will save lots of time when you come back to update it, and will be invaluable for someone else to support your script.
A comment will show as italic turquoise text in the script editor.
Comments are ignored by the script engine. Having lots of lines of comments will not slow down your scripts at all. When the script is compiled into machine code the comments are simply not included so they do not affect performance.
You can start a comment using two forward slashes. The comment will end at the end of the line. Any further lines will not be comments but considered script. For example the following line is a comment
pascal
//this is a comment
Single line comments can be made at the end of a line of script code - only the text after the slashes is a comment. In the following screen shot the Value will be set to the 10 - the rest of the line is a comment
Any text between curly braces will be a comment. You start the comment with an opening brace, and the comment continues until the closing brace. The opening and closing braces can be on different lines and all text between then will be a comment. For example the following lines are comments
pascal
{all the text between thecurly braces is comment}
Curly brace comments can start anywhere on a line. Only the text following the opening brace is a comment. In the following screen shot the Value will be set to 10 - the rest of the line (and the following lines is a comment)
Comments
The first thing you should know is that you can insert comments into your script to describe what you are doing.
WARNING
Comment your script as much as possible. It will save lots of time when you come back to update it, and will be invaluable for someone else to support your script.
A comment will show as italic turquoise text in the script editor.
Comments are ignored by the script engine. Having lots of lines of comments will not slow down your scripts at all. When the script is compiled into machine code the comments are simply not included so they do not affect performance.
There are two ways to construct comments
Single Line Comments
You can start a comment using two forward slashes. The comment will end at the end of the line. Any further lines will not be comments but considered script. For example the following line is a comment
Single line comments can be made at the end of a line of script code - only the text after the slashes is a comment. In the following screen shot the Value will be set to the 10 - the rest of the line is a comment
Multi Line Comments
Any text between curly braces will be a comment. You start the comment with an opening brace, and the comment continues until the closing brace. The opening and closing braces can be on different lines and all text between then will be a comment. For example the following lines are comments
Curly brace comments can start anywhere on a line. Only the text following the opening brace is a comment. In the following screen shot the Value will be set to 10 - the rest of the line (and the following lines is a comment)