INDEX (Cont.) ORD function, 1-7, 2-7, 6-15 o r d e red set, 2 - 5 Ordinal value, 2-7, 2-11 OTHERWISE clause, 1-6, 5-6 OUTPUT, 1-7, 4-2 Output, 7-1 Output procedure, 6-5 OVERLAID, 6-37 PACK procedure, 1-7, ~-5, ~-10 PACKED, 1-6, 2-28 Packed array, 2-11,2-28 Packed file, 2-28 Packed record, 2-28 Packed set, 2-28 PAGE procedure, 1-7, 6-5, 7-14 Parameter, 6-21 act ua 1, 5 -1 4 formal, 6-<strong>20</strong>, 6-29, 6-32 Parentheses, 1-8 PASDDT, 9-1 PASDDT command, 9-3 Passing parameters, 6-22 Period, 1-8 Plus sign, 1-8 Pointer, 1-8 Pointer data type, 2-1, 2-26 Pointer variable, 6-6 Precedence of operators, 3-6 PRED function, 1-7, 6-16 Predecessor, 2-2 Predeclared fun c t ion, 6 -1 2 identifier, 1-7 procedure, 6-1 subprog ram, 6-1 Predefined data type, 2-2 PROCEDURE, 1-6, 4-1 Procedure, 6-1 CLOSE, 1-7, 6-5, 7-4 DATE, 1-7, 6-5, ~-12 DISPOSE, 1-7, 5-5, 6-6 FIND, 1-7, 6-5, 7-4 GET, 1-7, 6-5, 7-6 HALT, 1-7, 6-5 LINELIMIT, 1-7, ~-5, 7-7 MAHK, 6-5 NEW, 1-7, 6-5, 6-6 OPEN, 6-5, 7-8 PACK, 1-7, 6-5, 6-10 PAGE, 1-7, 6-5, 7-14 PUT, 1-7, 6-5, 7-15 READ, 1-7, 6-5, 7-16 READLN, 1-7, 6-5, 7-18 RELEASE, 6-5 RESET, 1-7, 6-5, 7-19 REWRITE, 1-7, 6-5, 7-<strong>20</strong> TIME, 1-7, 6-5, 6-12 UNPACK, 1-7, ~-5, 6-11 WRITE, 1-7, 6-5, 7-21 WRITELN, 1-7, 6-5, 7-25 Procedure call, 5-14 Procedure calling sequences, G-l Procedure declaration, 6-28 Procedure identifier, 6-29 Procedure name, 5-14 PROCEED command, 9-10 PROGRAM, 1-5, 4-2 Program development, 8-1 Program heading, 4-1, 4-2 Program name, 4-2 Program structure, 1-2 PUT procedure, 1-7, 6-5, 7-15 Random access, 7-3 READ procedure, 1-7, 6-5, 7-16 READ statement, 2-12 READLN procedure, 1-7, ~-5, 7-18 READLN statement, 2-12 REAL data type, 1-7, 2-2, 2-3 Record access, 7-3 Record access mode, 7-10 RECORD data type, 1-6, 2-8, 2-15 Record examples, 2-21 Record format, 7-3 Record length, 7-10 Recrrrd type, 7-11 Record type compatibility, 2-19 Record variable, 5-12 Records with variants, 2-17 Relational expression, 3-4 Relational operator, 1-8, 2-11, 3-1, 3-4 RELEASE procedure, 6-5 REM operator, 1-6 REMOVE command, 9-11 REPEAT statement, 1-6, 5-8, 5-10 Repetitive statement, 5-8 Reserved words, 1-~ RESET procedure, 1-7, 6-5, 7-19 Result type, 6-32 REWRITE procedure, 1-7, 6-5, 7-<strong>20</strong> ROUND function, 1-7, 6-15 jRUN command, 8-5 RUN command, 8-17 Run-time errors, A-I -p- -R- -s- SAVE command, 8-17 Scalar data type, 2-1, 2-2 Scientific notation, 2-4 Scope of identifiers, 3-7 Semicolon, 1-8 Semi reserved words, 1-6 Separate compilation, 6-37 Sepa ra to r, 1-8 Sequential access, 7-3, 7-10 SET command, 1-6, 9-11, 9-12, 9-13 SET data type, 2-8, 2-22 Set expression, 3-5 Index-4
INDEX (Co n t. ) Set operator, 1-8, 3-1, 3--5 Setting a breakpoint, 9-4 Shifting program control, 5-4 SHOW command, 9-14 Simple statement, 5-1 SIN function, 1-7, 6-14 SINGLE data type, 1-7, 2-2 Slash, 1-8 SNGL function, 1-7, 6-15 S P e cia 1 s ym bo 1 s, 1-8 Specifying output files, 8-11 Specifying switches in source code, 8-9 SQR function, 1-7, 6-14 SQRT function, 1-7, 6-14 Square brackets, 1-8 START command, 8-17, 9-1 Statement assignment, 2-12, 5-2 CASE, 1-6, 2-17, 5-4, 5--6 compound, 5-1, 5-2 conditional, 5-4 FOR, 1-'5, 5-8 GOTO, l-6, 4-3, 5-13 IF, 1-6 IF-THEN, 5-4 IF-THEN-ELSE, 5-4, 5-5 READ, 2-12 READLN, 2-12 REPEAT, 1-6, 5-8, 5-10 repetitive, 5-8 simple, 5-1 WHILE, 1-6, 5-8, 5-11 WITH, 1-6, 5-12 String comparison, 2-1l String variable, 7-11 Structured data type, 2-1, 2-8 Subprogram, 1-4 Subprogram format, 6-<strong>20</strong> Subprogram heading, 6-<strong>20</strong> Subrange data type, 2-6 Subrange operator, 1-8 SUCC function, 1-7, 6-16 Successor, 2-2 Switch /ABORT, 8-7 /BINARY, 8-7 /CHECK, 8-7, 8-8 /CREF, 8-7, 8-8 /CROSS-REFERENCE, 8-7, 8-8 /DEBUG, 8-7, 8-8, 9-1 /ERROR-LIMIT, 8-7, 8-8 /FLAG-NON-STANDARD, 8-7, 8-8 /LISTING, 8-7, 8-9, 8-11 /MACHINE-CODE, 8-7, 8-9 /NATIONAL, 8-9 NATIONAL, 8-7 /WARNINGS, 8-9 /WARNINGs, 8-7 Symbolic values, 9-1 Syntax summary, C-l 'rag field, 2-17 'rag name, /,-1 7 'rag type, 2-1 7 /TAKE command, 8-5, 8-6 Test condition, 5-5 TEXT file, 1-7, 2-12, 2-25 Text file, 2-25 'rHEN, 1-t; TIME procedure, 1-7, 6-5, 6-12 TO, 1-6, 5-8 TRACE command, 9-15 Transfer functions, ~-15 'rRUE, 1-7 TRUNC function, 1-7, 6-15 Truth value, 3-5 TYPE, 1-6, 4-1, 4-5 Type compatibility, 2-29 Type definition, 4-5 Type identifier, 4-5 TYPE section, 2-1 UNDEFINED function, 1-7, 6-15 Underscore, 1-7 UNPACK procedure, 1-7, 6-5, 6-11 UNTIL, 1-6, 5-10 Upper limit, 2-6 User identifier, 1-8 User-defined scalar data type, 2-5 VALUE, 1-6, 4-1, 4-7 Value declaration, 4-7 Value initialization, 4-7 Value parameter, 6-22 VAR, 1-6, 4-1, 4-6, 6-23 VAR section, 2-1 VARIABLE, 7-11 Variable declaration, 4-6 Variable length, 7-3 Variable name, 4-6 Variable parameter, 6-23 Variant clause, 2-15 -T- -u- -v- -w- /WARNINGS switch, 8-9 WARNINGS switch, 8-7 WHILE statement, 1-6, 5-8, 5-11 WITH statement, 1-6, 5-12 WRITE procedure, 1-7, 6-5, 7-21 WRITELN procedure, 1-7, 6-5, 7-25 Index-5
- Page 1 and 2:
TOPS-20 PASCAL Language Manual AA-L
- Page 3 and 4:
CONTENTS PREFACE CHAPTER 1 INTRODUC
- Page 5 and 6:
7 • 1 . 1 7 . 1 . 2 7 • 1 . 3 7
- Page 7:
G-l G-2 G-3 G-4 Status of Stack Aft
- Page 10 and 11:
• Appendix A lists the various me
- Page 13 and 14:
CHAPTER I INTRODUCTION PASCAL-20 is
- Page 15 and 16:
PROGRAM Calculator (INPUT, OUTPUT);
- Page 17 and 18:
INTRODUCTION 1.1.6 Compilation Unit
- Page 19 and 20:
INTRODUCTION 1.2.3 Identifiers PASC
- Page 21 and 22:
INTRODUCTION The semicolon and the
- Page 23 and 24:
INTRODUCTION In the following examp
- Page 25 and 26:
CHAPTER 2 PASCAL DATA TYPES This ch
- Page 27 and 28:
PASCAL DATA TYPES In addition to de
- Page 29 and 30:
PASCAL DATA TYPES You can use strin
- Page 31 and 32:
PASCAL DATA TYPES The base type can
- Page 33 and 34:
PASCAL DATA TYPES is BOOLEAN, then
- Page 35 and 36:
PASCAL DATA TYPES In the three-dime
- Page 37 and 38:
PASCAL DATA TYPES To assign values
- Page 39 and 40:
PASCAL DATA TYPES 2.3.1.5 Array Exa
- Page 41 and 42:
PASCAL DATA TYPES The fields in thi
- Page 43 and 44:
PASCAL DATA TYPES 2.3.2.2 Assigning
- Page 45 and 46:
PASCAL DATA TYPES For example, assu
- Page 47 and 48:
PASCAL DATA TYPES Sets are compatib
- Page 49 and 50:
PASCAL DATA TYPES Example 3 F I 1..
- Page 51 and 52:
PASCAL DATA TYPES Pointer type defi
- Page 53:
PASCAL DATA TYPES Example 2 VAR Cit
- Page 56 and 57:
EXPRESSIONS Table 3-1: Arithmetic O
- Page 58 and 59:
EXPRESSIONS TabJe 1-2: Result Types
- Page 60 and 61:
EXPRESSIONS The set operators (+, *
- Page 62 and 63:
EXPRESSIONS PROGRAM Level_.O (IN PU
- Page 65 and 66:
CHAPTEH 4 PROGRAM HEADING AND DECLA
- Page 67 and 68:
PROGRAM HEADING AND DECLARATION SEC
- Page 69 and 70:
PROGRAM HEADING AND DECLARATION SEC
- Page 71:
PROGRAM HEADING AND DECLARATION SEC
- Page 74 and 75:
PASCAL STATEMENTS Simple and compou
- Page 76 and 77:
PASCAL STATEMENTS Example q Ase~5 :
- Page 78 and 79:
PASCAL STATEMENTS The objects of th
- Page 80 and 81:
PASCAL STATEMENTS Example 1 CASE EN
- Page 82 and 83:
PASCAL STATE~ENTS Example 4 := 1 TO
- Page 84 and 85:
PASC~L STATEMENTS 5.5 THE WITH STAT
- Page 86 and 87:
PASCAL STATEMENTS Example FOR I :=
- Page 89 and 90:
CHAPTER ~ PROCEDURES AND FUNCTIONS
- Page 91 and 92:
PROCEDURES AND FUNCTIONS Table ~-l:
- Page 93 and 94:
PROCEDURES AND FUNCTIONS Table ~-1:
- Page 95 and 96:
PROCEDURES AND FUNCTIONS This progr
- Page 97 and 98:
PROCEDURES AND FUNCTIONS You can al
- Page 99 and 100:
PROCEDURES AND FUNCTIONS This progr
- Page 101 and 102:
PROCEDURES AND FUNCTIONS Boolean fu
- Page 103 and 104:
PROCEDURES AND FUNCTIONS Table ~-2:
- Page 105 and 106:
PROCEDURES AND FUNCTIONS Table h-3:
- Page 107 and 108:
PROCEDURES AND FUNCTIONS Table ~-3:
- Page 109 and 110:
PROCEDURES AND FUNCTIONS Data items
- Page 111 and 112:
PROCEDURES AND FUNCTIONS The actual
- Page 113 and 114:
PROCEDURES AND FUNCTIONS An optiona
- Page 115 and 116:
PROCEDURES AND FUNCTIONS Example 1
- Page 117 and 118:
PROCEDURES AND FUNCTIONS Fo rma t 1
- Page 119 and 120:
PROCEDURES AND FUNCTIONS As a resul
- Page 121 and 122:
PROCEDURES AND FUNCTIONS label sect
- Page 123 and 124:
PROCEDURES AND FUNCTIONS The functi
- Page 125 and 126:
PROCEDURES AND FUNrTIONS Example 1
- Page 127 and 128:
CHAPTER 7 INPUT AND OUTPUT This cha
- Page 129 and 130:
INPUT AND OUTPUT In executing this
- Page 131 and 132:
INPUT AND OUTPUT where: file variab
- Page 133 and 134:
INPUT AND OUTPUT When you reach the
- Page 135 and 136:
INPUT AND OUTPUT To specify only th
- Page 137 and 138:
INPUT AND OUTPUT 7.7.4 Record Type
- Page 139 and 140:
INPUT AND OUTPUT This example cause
- Page 141 and 142:
INPUT AND OUTPUT 7.9 THE PUT PROCED
- Page 143 and 144:
INPUT AND OUTPUT READ does not read
- Page 145 and 146:
INPUT AND OUTPUT This program fragm
- Page 147 and 148:
INPUT AND OUTPUT You must call REWR
- Page 149 and 150:
INPUT AND OUTPUT The following rule
- Page 151 and 152:
INPUT AND OUTPUT This example write
- Page 153 and 154:
INPUT l\ND OUTPUT Example 1 BEGIN W
- Page 155:
INPUT AND OUTPUT The first referenc
- Page 158 and 159:
USING PASCAL ON TOPS-20 8.2 FILE SP
- Page 160 and 161:
USING PASCAL ON TOPS-20 After plann
- Page 162 and 163:
USING P~SCAL ON TOPS-20 /TAKE The /
- Page 164 and 165:
USING PASCAL ON TOPS-20 If you omit
- Page 166 and 167:
USING PASCAL ON TOPS-20 The first c
- Page 168 and 169:
• AVERAGE SCORE SOURCE LISTING o
- Page 170 and 171:
USING PASCAL ON TOPS-20 The compile
- Page 172 and 173:
USING PASCAL ON TOPS-20 8.4.6.3 Cro
- Page 174 and 175:
USTNG PASCAL ON TOPS-20 Example 3 f
- Page 176 and 177:
PASDDT: THE PASCAL-20 DEBUGGER 9.3
- Page 178 and 179:
PASDDT: THE PASCAL-?O DEBUGGER cons
- Page 180 and 181:
PASDDT: THE PASCAL-20 DEBUGGER As s
- Page 182 and 183:
PASDDT: THE PASCAL-20 DEBUGGER Note
- Page 184 and 185:
PASDDT: THE PASCAL-20 DEBUGGER Note
- Page 186 and 187:
PASDDT: THE PAS~AL-20 DEBUGGER ]. T
- Page 188 and 189:
PASDDT: THE PASCAL-20 DEBUGGER Note
- Page 190 and 191:
P~SDDT: THE PASCAL-?O DEBUGGER To r
- Page 193 and 194:
._------------- Table A-I: Run-time
- Page 195 and 196:
PASCAL MESSAGES -------------------
- Page 197 and 198:
PASCAL MESSAGES ? PASOl7 "BEGIN" ex
- Page 199 and 200:
PASCAL MESSAGES ? PASIOS Sign not a
- Page 201 and 202: PASCAL MESSAGES ? PAS130 Expression
- Page 203 and 204: PASCAL MESSAGES ? PAS157 Case label
- Page 205 and 206: PASCAL MESSAGES ? PAS184 External p
- Page 207 and 208: PASCAL MESSAGES ? PAS?II Incorrect
- Page 209 and 210: PASCAL MESSAGES ? PAS253 Too many a
- Page 211: PASCAL MESSAGES % PAS457 Nonstandar
- Page 214 and 215: ASCII CHARACTER SET Table 8-1: The
- Page 217 and 218: APPENDIX C SYNTAX SUMMARY This appe
- Page 219 and 220: SYNTAX Sm1MARY ::= I I I I
- Page 221 and 222: SYNTAX Sur~MARY ::= := ::= I
- Page 223 and 224: SYNTAX SU~1MARY ::= ft ::= ::=
- Page 225: SYNTAX SUr-1MARY ""= ::= ,
- Page 228 and 229: -------- ---- ---- ----------------
- Page 230 and 231: ISO COMPLIANCE 4. A program paramet
- Page 232 and 233: ISO CO~PLIANCE The DISPOSE procedur
- Page 234 and 235: ISO COMPLIANCE In the UNPACK(z,i. ,
- Page 236 and 237: ISO COMPLIANCE In a FOR statement,
- Page 239 and 240: APPENDIX F DIFFERENCES BETWEEN PASC
- Page 241 and 242: DIFFERENCES BETWEEN PASCAL-20 AND V
- Page 243 and 244: APPENDIX G PROCEDURE AND FUNCTION C
- Page 245 and 246: PROCEDURE AND FUNCTION CALLING SEQU
- Page 247 and 248: PROCEDURE ~ND FUNCTION CALLING SEQU
- Page 249 and 250: INDEX /ABORT switch, 8-7 ABS functi
- Page 251: Function (Cont.) EOF, 1-7, 6-14 EOL
- Page 256: - Do Not Tear - Fold Here and Tape