the precedence of internationalization variables used to determine
the values of locale categories.)
.TP7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP7
\fILC_COLLATE\fP
.sp
Determine the locale for the behavior of ranges, equivalence classes,
and multi-character collating elements within regular
expressions and by the string comparison operators.
.TP7
\fILC_CTYPE\fP
Determine the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments) and the behavior of
character classes within regular expressions.
.TP7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard
error.
.TP7
\fINLSPATH\fP
Determine the location of message catalogs for the processing of \fILC_MESSAGES
\&.\fP
.sp
.SHASYNCHRONOUSEVENTS
.LP
Default.
.SHSTDOUT
.LP
The \fIexpr\fP utility shall evaluate the expression and write the
result, followed by a <newline>, to standard
output.
.SHSTDERR
.LP
The standard error shall be used only for diagnostic messages.
.SHOUTPUTFILES
.LP
None.
.SHEXTENDEDDESCRIPTION
.LP
The formation of the expression to be evaluated is shown in the following
table. The symbols \fIexpr\fP, \fIexpr1\fP, and
\fIexpr2\fP represent expressions formed from \fIinteger\fP and \fIstring\fP
symbols and the expression operator symbols (all
separate arguments) by recursive application of the constructs described
in the table. The expressions are listed in order of
increasing precedence, with equal-precedence operators grouped between
horizontal lines. All of the operators shall be
left-associative.
.TSC
center; l lw(40).
\fBExpression\fP T{
.na
\fBDescription\fP
.ad
T}
\fIexpr1\fP\ |\ \fIexpr2\fP T{
.na
Returns the evaluation of \fIexpr1\fP if it is neither null nor zero; otherwise, returns the evaluation of \fIexpr2\fP if it is not null; otherwise, zero.
.ad
T}
\fIexpr1\fP\ &\ \fIexpr2\fP T{
.na
Returns the evaluation of \fIexpr1\fP if neither expression evaluates to null or zero; otherwise, returns zero.
.ad
T}
\ T{
.na
Returns the result of a decimal integer comparison if both arguments are integers; otherwise, returns the result of a string comparison using the locale-specific collation sequence. The result of each comparison is 1 if the specified relationship is true, or 0 if the relationship is false.
.ad
T}
\fIexpr1\fP\ =\ \fIexpr2\fP T{
.na
Equal.
.ad
T}
\fIexpr1\fP\ >\ \fIexpr2\fP T{
.na
Greater than.
.ad
T}
\fIexpr1\fP\ >=\ \fIexpr2\fP T{
.na
Greater than or equal.
.ad
T}
\fIexpr1\fP\ <\ \fIexpr2\fP T{
.na
Less than.
.ad
T}
\fIexpr1\fP\ <=\ \fIexpr2\fP T{
.na
Less than or equal.
.ad
T}
\fIexpr1\fP\ !=\ \fIexpr2\fP T{
.na
Not equal.
.ad
T}
\fIexpr1\fP\ +\ \fIexpr2\fP T{
.na
Addition of decimal integer-valued arguments.
.ad
T}
\fIexpr1\fP\ -\ \fIexpr2\fP T{
.na
Subtraction of decimal integer-valued arguments.
.ad
T}
\fIexpr1\fP\ *\ \fIexpr2\fP T{
.na
Multiplication of decimal integer-valued arguments.
.ad
T}
\fIexpr1\fP\ /\ \fIexpr2\fP T{
.na
Integer division of decimal integer-valued arguments, producing an integer result.
.ad
T}
\fIexpr1\fP\ %\ \fIexpr2\fP T{
.na
Remainder of integer division of decimal integer-valued arguments.
.ad
T}
\fIexpr1\fP\ :\ \fIexpr2\fP T{
.na
Matching expression; see below.
.ad
T}
(\ \fIexpr\fP\ ) T{
.na
Grouping symbols. Any expression can be placed within parentheses. Parentheses can be nested to a depth of {EXPR_NEST_MAX}.
.ad
T}
\fIinteger\fP T{
.na
An argument consisting only of an (optional) unary minus followed by digits.
.ad
T}
\fIstring\fP T{
.na
A string argument; see below.
.ad
T}
.TE
.SSMatchingExpression
.LP
The \fB':'\fP matching operator shall compare the string resulting
from the evaluation of \fIexpr1\fP with the regular
expression pattern resulting from the evaluation of \fIexpr2\fP. Regular
expression syntax shall be that defined in the Base
Definitions volume of IEEE\ Std\ 1003.1-2001, Section 9.3, Basic Regular
Expressions, except that all patterns are anchored to the beginning
of the string (that is, only sequences starting at the
first character of a string are matched by the regular expression)
and, therefore, it is unspecified whether \fB'^'\fP is a
special character in that context. Usually, the matching operator
shall return a string representing the number of characters
matched ( \fB'0'\fP on failure). Alternatively, if the pattern contains