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
6: 1
Chapter 6 Statements
A
statement
is a sequence of special
symbols
, reserved
words
, and
expressions
that either performs a specific set of actions on a program's
data or controls program flow. Table 6-1 lists and describes
statements.
Table 6-1. HP Pascal Statements and Purposes
---------------------------------------------------------------------------
| | |
| Statement Type | Purpose |
| | |
---------------------------------------------------------------------------
| | |
| compound | Group statements |
| | |
---------------------------------------------------------------------------
| | |
| empty | Do nothing |
| | |
---------------------------------------------------------------------------
| | |
| assignment | Assign a value to a variable |
| | |
---------------------------------------------------------------------------
| | |
| procedure | Invoke a procedure |
| | |
---------------------------------------------------------------------------
| | |
| GOTO | Transfer control unconditionally |
| | |
---------------------------------------------------------------------------
| | |
| IF, CASE | Conditional selection |
| | |
---------------------------------------------------------------------------
| | |
| WHILE, REPEAT, FOR | Iterate a group of statements |
| | |
---------------------------------------------------------------------------
| | |
| WITH | Manipulate record fields |
| | |
---------------------------------------------------------------------------
The empty, assignment, procedure, and GOTO statements are commonly called
simple
statements. The
compound
, IF, CASE, WHILE, REPEAT, FOR, and WITH
statements are referred to as
structured statements
because they
themselves may contain other statements.
Syntax
Statements: