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
4-: 1
Chapter 4 Expressions
An
expression
is a construct composed of operators and operands that
represent the computation of a result of a particular type. In the
simplest case, an expression consists of a single operand with no
operator.
The type of an expression is known when the expression is written, and
never changes. The actual value, however, may not be known until the
system evaluates the expression at run time. It may differ for each
evaluation.
Constant expressions are a restricted class of HP Pascal expressions.
They must return a value that is computable at compile time.
Consequently, operands in constant expressions must be integers, reals,
longreals, or declared constants. The operators used with constant
expressions must be +, -, *, DIV, or MOD. All other operators are
excluded. Furthermore, only calls to the following standard functions
are legal:
* abs
* binary
* chr
* hex
* octal
* odd
* ord
* pred
* strlen
* succ