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
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.
Note: Although you can place a comment at the end of a line containing executable code, you cannot place executable code at the end of a line containing a comment; the presence of the apostrophe at the start of the comment will cause the balance of the line (including the code) to be ignored.