HP Pascal/iX Reference Manual (31502-90022)
Table Of Contents
- Top of Document
- Preface
- Chapter 1 Introduction
- Chapter 2 Language Elements
- Chapter 3 Data Types
- Chapter 4 Expressions
- Chapter 5 The Declaration Section
- Chapter 6 Statements
- Chapter 7 Program Structure
- Chapter 8 Procedures and Functions
- Chapter 9 Standard Routines
- Chapter 10 Input and Output
- Chapter 11 System Programming Extensions
- Chapter 12 Compiler Options
![](/manual/hp/mpe-ix-7-5-operating-system/hp-pascalix-reference-manual-31502-90022/images/img-57.png)
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.