Programming command that is not run or executed when being read by the computer. A commonly used nonexecutable statement is a remark (REM) used in batch files and other Microsoft Windows and DOS programs.
Below is a listing of other text used to remark, comment, or cause the line to be skipped.
|#||The pound symbol is a used to comment a line in programming languages such as Perl. This symbol is only required once at the beginning of what you want ignored.|
|;||The semicolon is used to remark a line in an INI file and in AutoHotkey. This symbol is only required once at the beginning of the line. Note that it must be at the beginning of the line in an INI file.|
|!||The exclamation mark is used in scripting programs to comment a line. This symbol is commonly required at the beginning of the line.|
|/* */||Used to add a comment to a line in the C, PHP and other programming languages. The comment must begin with "/*" and end with "*/". Below is an example of how this may look.
/* Computer Hope comment */
|<!-- -->||Used in HTML and some other scripting languages. Begin the comment with "<!--" and end it with "-->" Below is an example of how this may look in the HTML code.
<!-- Computer Hope comment -->
|'||In Microsoft QBasic starting a line with single quote is a way of creating a nonexecutable line.|
Example of Nonexecutable statements
Below is a basic example of a Perl script and an example of how nonexecutable statements (comments) may appear in the code.
#Example of nonexecutable statements, this line is ignored. use strict; #Use strict to prevent errors. my $name = "Nathan"; #Set the name variable to Nathan print "Hello $name how are you?\n"; #Print greeting
In the above Perl example a comment in Perl can start either at the beginning of a line to help describe a section of code and can be used at the end of a line to describe a line.