Less-than sign


The less-than sign is a mathematical symbol that denotes an inequality between two values. The widely adopted form of two equal-length strokes connecting in an acute angle at the left,, has been found in documents dated as far back as the 1560s. In mathematical writing, the less-than sign is typically placed between two values being compared and signifies that the first number is less than the second number. Examples of typical usage include < 1 and −2 < 0. Since the development of computer programming languages, the less-than sign and the greater-than sign have been repurposed for a range of uses and operations.

Computing

The less-than sign,, is an original ASCII character.
The less-than sign may be used for an approximation of the opening angle bracket,. ASCII does not have angle brackets but are standard in Unicode. The latter is expected in formal texts.

Programming language

In BASIC, Lisp-family languages, and C-family languages, operator < means "less than".
In Coldfusion, operator .lt. means "less than".
In Fortran, operator .LT. means "less than"; later versions allow <.
In Bourne shell, operator -lt means "less than".

Double less-than sign

The double less-than sign,, may be used for an approximation of the much-less-than sign, or of the opening guillemet,. ASCII does not have a much-less-than sign.
In Bash, Perl, and Ruby, operator is used to denote the beginning of a here document.
In C and C++, operator represents a binary left shift.
In the C++ Standard Library, operator, when applied on an output stream, acts as insertion operator and performs an output operation on the stream.
In Ruby, operator acts as append operator when used between an array and the value to be appended.
In XPath the operator returns true if the left operand precedes the right operand in document order; otherwise it returns false.

Triple less-than sign

In PHP, operator is used to denote the beginning of a heredoc statement
In Bash, is used as a "here string", where is expanded and supplied to the command on its standard input, similar to a heredoc.

Less-than sign plus equals sign

The less-than sign plus the equals sign,, may be used for an approximation of the less-than-or-equal-to sign,. ASCII does not have a less-than-or-equal-to sign, but Unicode defines it at code point U+2264.
In BASIC, Lisp-family languages, and C-family languages, operator means "less than or equal to". In Sinclair BASIC it is encoded as a single-byte code point token.
In Prolog, means "less than or equal to".
In Fortran, operator means "less than or equal to".
In Bourne shell and Windows PowerShell, the operator means "less than or equal to".

Less-than sign plus Hyphen-minus

In the R programming language, the less-than sign is used in conjunction with a hyphen-minus to create an arrow, this can be used as the left assignment operator.

Shell scripts

In Bourne shell, less-than sign is used to redirect input from a file. Less-than plus ampersand is used to redirect from a file descriptor.

Spaceship operator

Less-than sign is used in the spaceship operator.

HTML

In HTML, the less-than sign is used at the beginning of tags. The less-than sign may be included with &lt;. The less-than-or-equal-to sign,, may be included with &le;.

Mathematics

In an inequality, the less-than sign always "points" to the smaller number. Put another way, the "jaws" always direct to the larger number.