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

5- 8
Example
TYPE
s = string[80];
CONST
blank = ' ';
greeting = s['Hello!'];
farewell = s['G',2 OF 'o','d','bye'];
blank_string = s[10 OF blank];
Label Declaration
A
label declaration
specifies integer labels that mark executable
statements in the body of the block. The reserved word LABEL precedes
one or more integers separated by commas. Control is transferred to a
labeled statement by a GOTO statement. For more information about GOTO
statements, see Chapter 6 .
Integers must be in the range 0 to 9999. Leading zeros are not
significant. For example, the labels 9 and 00009 are identical.
In HP Pascal, label declarations must come first in the declaration part
of a block.
A label must occur in the block of the procedure, function, or program
where the label is declared. For every label there must be one and only
one statement with that label.
Syntax
Label_decl:
Example
LABEL 9, 19, 40;
.
.
.
40 : x:=10;
.
.
GOTO 40;
Type Definition
A TYPE section introduces the name and set of values for a user-defined
type. HP Pascal requires that a
type identifier
be defined before its