KDF_9_Algol_Programming.pdf

(6230 KB) Pobierz
An English Electric-Leo-Marconi mini-manual
KDF9
ALGOL
programming
C
All rights reserved
ENGLISH ELECTRIC-LEO-MARCONI COMPUTERS
Ltd.
KIDSGROVE STOKE .ON.TRENT STAFFORDSHIRE
Publication
1002
mm (R)
Telephone: Kidsgrove
2141
1000565
price: five shillings
i
ALGOL PROGRAMMING FOR, KDF 9
CONTENTS
Section
LIST OF ABBREVIATIONS USED IN THIS MANUAL
SECTION
SECTION
SECTION
3'
SECTION
SECTION
5'
SECTION
INTRODUCTION
'IWO STIIll'LE PROGRAMS
PROGRAM STRUCTURE AND BASIC SYMBOLS
DECIMAL NUMBERS
IDENTIFIERS
SDlIPLE ARI'J.'H!.{ETIC EXPRESSIONS
SIMPLE BOOLEAN EXPRESSIONS
ARITHMETIC AND BOOLEAN EXPclESSIONS
Page
iv
5
7
9
11
13
17
19
8·1
8·2
8'3
8·4
19
19
20
21
SEXlTION
7'
SECTION
If Clauses
Use of the If Clause in Arithmetic Expressions
Use of the If Clause in Boolean Expressions
A Use for Parentheses
SECTION
9'
SECTION
10·
SECTION
11-
SECTION
12-
STANDARD FUNCTIONS
STATEMENTS
ASSIGNMENT STATEMENTS
GOTO STATEMENTS AND LABELS
23
25
27
31
12·1
12·2
31
31
33
13.1
13-2
33
34
Goto
Statements
Labelled Basic Statements
SEXlTION
13-
FOR STATEMENTS
The General Form of the For Statement
Arithmetic Expression Element
it
CONTENTS
( Continued)
Section
Step-until Element
While Element
Miscellaneous Notes on For Statements
SECTION
14·
SECTION
15·
SECTION
16·
COMPOUND STATEMENTS
CONDITIONAL STATEMENTS
SUBSCRIPTED VARIABLES AND ARRAYS
1,. ,
1,·4
13·5
Page
34
35
,4
37
,9
41
Use of Subscripted Variables in Expressions
Use of Subscripted Variables in Statements
SECTION
17·
INPUT
AND
OUTPUT OF DATA
16·1
16·2
41
42
43
17 ·1
17·2
17·,
17·4
Device Numbers
Simple Forms for Reading and Writing Numbers
Further Input and Output Statements
The Layout
The
Format Expression
Input and Output of Text
Initialisation and Closure of Devices
Manipulation of Magnetic Tapes
Restrictions
SECTION
18·
DECLARATIONS, BLOCKS
AND PROGRAMS
43
44
45
46
17·5
17·6
17·7
17·8
43
49
49
50
47
17·9
Declaration of Simple Variables
Array
Declarations
Blocks
Definition of a
Program
SECTION
19·
PROCEDURES
18·1
18·2
18·,
18·4
54
56
57
5,
5,
61
The Purpose
and
Application of Procedures
Procedure Declarations and Corresponding Calls
Declaration of Procedures Defining a Function DeSignator
The Value Part
.
The Specification Part
The
Procedure Body
The ALGOL Procedure Library
SmTIOJi 20·
CCIIIIElI'r COBVEHTIONS
19·1
19·2
61
64
66
62
6,
19·,
19·4
19·5
19·6
19·7
68
61
11
Zgłoś jeśli naruszono regulamin