Why would one want to add comments to his or her script?

A code may be more advanced or less advanced, but as time goes by, and work piles up, naturally, we may forget what we’ve done, or forget our methods or could use a refresher when that’ll help us organize our thoughts.

Another good reason would be, if we prepare the script to a future work of a different programmer, and obviously, he or she could use inline information in understanding exactly how the script goes or generated.

For comments we use #

Every comment has after the # a verbal phrase, which the compiler isn’t processing of the whole script.

The comment is also differentiated by color, and usually has the color green or grey, depending on the IDE’s settings.

A comment may start at the beginning of the line or in the middle of it, nonetheless, its content isn’t being processed by the software.

Example 1:

A comment at the beginning of the line.

Example 2:

A comment in the middle of the line.

From example 1, it can be seen that the comment after the # (3+2) isn’t processed but what comes before (1+1) or after the line of the comment (3+10) is processed and gets the complier’s response.

From example 2, it can be seen that the input prior to the comment is being processed and gets an output, as well as the content before (1+1) the comment, but the content after the # (2+2) isn’t.

If we’d like to add a long comment to a script, each line must start in # and we can use the abbreviation ctrl+shift+c to comment out all the highlighted area, or to cancel it, another click of ctrl+shift+c will cancel the reading of the processor as a comment.

Example 3: