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- 20
Permissible Operators
assignment (entire :=
record)
field selection .
Standard Procedures
read
readdir
write
writedir
Example
TYPE
word_type = (int, ch);
word = RECORD { variant part only with tag }
CASE word_tag: word_type OF
int: (number: integer);
ch : (chars : PACKED ARRAY [1..2] of char);
END;
polys = (circle, square, rectangle, triangle);
polygon = RECORD { fixed part and tagless variant part }
poly_color: (red, yellow, blue);
CASE polys OF
circle: (radius: integer);
square: (side: integer);
rectangle: (length, width: integer);
triangle: (base, height: integer);
END;