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 comments 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 on a line. This symbol is commonly required at the beginning of the line.
/* */ Used to add a comment to a line in C, CSS (cascading style sheets), PHP (PHP: Hypertext Preprocessor), 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 add a comment to JavaScript. The following is an example of how this may look.

//JavaScript comment example
<!-- --> Used in HTML (hypertext markup language) 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 a single quote creates a nonexecutable line.

Examples of nonexecutable statements

The following is a basic example of a Perl script and 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 at the beginning of the line or after the 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