Nonexecutable statement

Updated: 05/04/2019 by Computer Hope
Hash, Pound, Number, and Octothorpe

Programming command that is not run or executed when being read by the computer. For example, a commonly used nonexecutable statement is REM (remark) used in batch files and other Microsoft Windows and DOS programs.

The following 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, CSS, PHP and other programming languages. The comment must begin with "/*" and end with "*/". The following is an example of how this may look.

/* Computer Hope comment */
// Two forward slashes at the beginning of a line is used to add a comment to JavaScript. The following is an example of how this may look.

//JavaScript comment example
<!-- --> Used in HTML and some other scripting languages. Begin the comment with "<!--" and end it with "-->". The following 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

The following 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 code, notice that the comment can begin either at the beginning of the line, or after executable code. If the comment begins in the middle of a line, the remainder of the line is considered a comment.

<!-- -->, Comment, Programming terms, Remark