6. Program Editor: Add Comments to a Script
About this task
You can add comments to your script to remind yourself or others of how your code works. Comments are ignored when your script is executed.
The apostrophe symbol ( ' ) is used to indicate that the text from the apostrophe to the end of the line is a comment.
Add a:
- Full line comment
- End of line comment.
Full line comment
Procedure
- Type an apostrophe ( ' ) at the start of the line.
-
Type a comment following the apostrophe.
Result: When the script is run, the presence of the apostrophe at the start of the line will cause the entire line to be ignored.
End of line comment
- Position the insertion point in the empty space beyond the end of the line of code.
- Type an apostrophe ( ' ).
- Type a comment following the apostrophe.
Results
When the script is run, the code on the first portion of the line will be executed, but the presence of the apostrophe at the start of the comment will cause the remainder of the line to be ignored.