TACL Reference Manual

Lexical Elements
HP NonStop TACL Reference Manual429513-018
2-8
Operators
Operators
Operators perform mathematical or logical operations on values. The operators
provided by TACL can be divided into three categories:
Arithmetic
Logical
String
For a complete list of operators, see Section 3, Expressions.
Constants
A constant is a value that you can store in a variable, use as a literal, or specify as part
of an expression. There are two types of TACL constants: text constants and string
constants. An integer is a special type of text constant.
Text Constants
A text constant is any sequence of these characters:
Nonmetacharacters from the ISO character set
Tilde-metacharacter combinations
TACL ignores leading and trailing spaces when interpreting a text constant.
Use a text constant with functions that accept text arguments. For example, the
#REPLY built-in function accepts a text argument. Built-in functions that accept text
arguments use all the remaining text on the line, with leading and trailing spaces and
end-of-line characters removed.
These text constants are valid:
DATA1
456
Please type a number
An integer is a special type of text constant that consists of a sequence of digits. The
sequence can include a prefix that specifies a positive or negative sign. Many integers
in this manual are listed with commas for clarification. Do not, however, include
commas when you specify an integer. TACL does not accept commas in integers.
Integer-constant:
[ + | - ]{ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }...
An integer constant can be written as one or more decimal digits (0-9) with an optional
sign prefix (+ or -). A TACL integer is similar to the FIXED numeric constant available