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
3- 3
Ordinal
Ordinal
types are types that have a one-to-one correspondence with a
subset of natural numbers. These values are ordered so that each has a
unique ordinal value that indicates its position in a list of all the
values of the type.
Ordinal types include
bit16
,
bit32
,
bit52
,
Boolean
,
char
,
enumerated
,
integer
,
shortint
,
longint
, and
subrange
. Enumerated types are declared
by enumerating all the possible values of the type. Subrange types are
declared by specifying the minimum and maximum values of the subrange.
Integral-types include
bit16
,
bit32
,
bit52
,
integer
,
shortint
,
longint
,
and subrange of
integer
.
Sub-integer includes
bit16
,
shortint
, and subrange of
integer
;
super-integer includes
bit52
and
longint
.
bit32
is a sub-integer when
used with a
real
operand or used in a
real
function such as sin;
otherwise,
bit32
is a super-integer.
Syntax
Ordinal_type: