HP Pascal/iX Reference Manual (31502-90022)

4-: 3
Selector:
Example
x:= 19; { Simplest case. "19" is the expression }
{ in the statement: "x := 19". }
100 + x; { Arithmetic operator with literal and }
{ variable operands. }
(A OR B) AND (C OR D) { Boolean operator with Boolean operands. }
x > y { Relational operator with variable }
{ operands. }
setA * setB; { Set operator with variable operands. }
'ice'+'cream' { Concatenation operator with string }
{ literal operands. }
x:= func1(B); { Function call }
Operands
An
operand
denotes the object that operators use in obtaining a value.
An operand may be a
literal
,
a declared constant
, a
variable access
(variable)
, a
set constructor
, a
dereferenced pointer
, or the
value
of
another expression.
Function calls
are also operands in the sense that
they return a result that an operator can use to compute another value.
An operand may be acted upon by an operator. Performing an operation on
operands of different types is called mixing data types. In all cases
except one, you cannot mix data types. You can, however, mix
reals
and
integers
with an operator that allows two real operators. Table 4-1
provides a list of operands and tells where they are described in the
manual.