pTAL Reference Manual (H06.03+)
Expressions
HP pTAL Reference Manual—523746-005
5-5
Arithmetic Expressions
Arithmetic Expressions
An arithmetic expression is a sequence of operands and arithmetic operators that
computes a single numeric value of a specific data type.
+
-
are unary plus and minus operators. The default is unary plus.
operand
is one of the elements in Table 5-2 on page 5-5.
arithmetic-operator
is one of the following:
Signed arithmetic operator +, -, *, /
Unsigned arithmetic operator '+', '-', '*', '/', '\'
Logical operator LOR, LAND, XOR
Table 5-2. Operands in Arithmetic Expressions
Element Description Example
Variable The identifier of a simple variable
, array element,
pointer, structure data item
, or equivalenced variable,
with or without @ or an index
var[10]
Constant A character string or numeric constant 103375
LITERAL The identifier of a named constant file_size
Function
invocation
The invocation of a procedure that returns a value $LEN (x)
expression Any expression x := y
(expression) Any expression, enclosed in parentheses (x := y)
Code space item The identifier of a procedure, subprocedure, or label
prefixed with @ or a read-only array optionally prefixed
with @, with or without an index
@label_a
+
-
operand
arithmetic-operator
operand
VST010.vsd










