Conformant array, h-25 CONST, 1-6, 4-1, 4-4 Constant definition, 4-4 Constant identifier, 4-4 Constant name, 4-4 Control variable, 5-8 COS function, 1-7, 6-13 Creating a program, 8-3 /CREF switch, 8-7, 8-8 /CROSS-REFERENCE switch, 8-7, 8-8 Data type, 2-1, 4-5, 4-f) ARRAY, 2-8 BOOLEAN, 1-7, 7.-2, 2-4 C HA R , 1 - 7, 2 - 2, 2 - 4 DOUBLE, 1-7, 2-2 enume ra ted, 2-4 FILE, 2-8, 2-24 INTEGER, 1-7, 2-2 pointer, 2-1, 2-2n predefined, 2-2 REAL, 1-7, 2-2, 2-3 RECORD, 1-6, 2-8, 2-15 scalar, 2-1, 2-2, 2-4 SET, 2-8, 2-22 SINGLE, 1-7, 2-2 structured, 2-1, 2-8 subrange, 2-6 Data types, 1-2 DATE procedure, 1-7, 6-5, 6-12 Deallocating memory, 6-6 /DEBUG switch, 8-7, 8-8, 9-1 Debugger, 9-1 Debugging a program, 9-1 Decimal notation, 2-2 Declaration, 1-4 Declaration section, 4-1 Declaring a data type, 2-1 Definition, 1-4 Delimiter, 1-8 Direct access, 7-3, 7-10 DISPLAY command, 9-7 DISPOSE procedure, 1-7, f)-5, 6-6 DIV operator, 1-6 Division, 1-8 DO, 1-6, 5-8, 5-11, 5-12 Documenting your program, 1-9 Dollar sign, 1-7 DOUBLE data type, 1-7, 2-2 Double precision, 2-4 DOWNTO, 1-6, 5-8 Dynamic allocation procedure, 6-6 Dynamic variable, 2-26, 6-6 ELSE clause, 1-6, 5-5 END, 1-6, 1-9 Enumerated data type, 2-5 EOF function, 1-7, 6-14 EOLN function, 1-7, 6-14 Equal, 1-8 /ERROR-LIMIT switch, 8-7, 8-8 Examples, 8-17 EXE file, 8-17 Executable statement, 1-4 EXECUTE command, 8-17, 9-1 Executing a program, 8-17 /EXIT command, 8-5 EXIT command, 9-9 EXP function, 1-7, h-13 EXPO function, 1-7, 6-16 Exponentintion, 1-8, 3-2 Expression, 3-1 a r i t hm e tic, 3-1 logical, 3-5 relational, 3-4 set, 3-5 Expression compatibility, 2-29 Extensions, D-1 EXTERNAL, f)-36 External file, 2-25, 4-2 External subprogram, f)-I, n-3h -D- -E- -F- FALSE, 1-7 Field identifier, 2-15 FILE, I-f) File TEXT, l-7 File characteristics, 7-2 FILE data type, 2-8, 2-24 File examples, 7-12 File history, 7-10 File organization, 7-3 File specification defaults, 8-3 File specifications, 8-2 File status, 7-10 File variable, 7-16 Final value, 5-8 FIND procedure, 1-7, 6-5, 7-4 FIXED, 7-11 Fixed length, 7-3 Fixed-length record, 7-3 /FLAG-NON-STANDARD switch, 8-7, 8-8 Floating-point format, 2-4 FOR statement, 1-6, 5-8 Formal and actual parameter compatibility, 2-29 Formal parameter, 6-<strong>20</strong>, 6-29, 6-32 FORTRAN, 6-29, 6-32, 6-36 FORWARD, 6-29, 6-32 FORWARD declaration, 6-35 FUNCTION, 1-6, 4-1 Function, 6-1 ABS, 1-7, 6-13 ARCTAN, 1-7, 6-13 CARD, 1-7, 6 -1 5 C HR, 1-7, 6 -15 CLOCK, 1-7, 6-15 COS, 1-7, 6 -13 Index-2
Function (Cont.) EOF, 1-7, 6-14 EOLN, 1-7, 6-14 EXP, 1-7, 6 -13 EXPO, 1.-7, 6-16 LN, 1-7, 6 -13 ODD, 1-7, 6 -14 ORD, 1-7, 2-7, G-15 PRED, 1-7, 6-1 () ROUND, 1-7, 6-l~) SIN, 1-7, f)-14 SNGL, 1-7, f)-IS SQR, 1-7, 6-14 SQRT, 1-7, 6-14 SUCC, 1-7, 6-16 TRUNC, 1-7, 6-1~) UNDEFINED, 1-7, f)-IS Function calling sequences, G-l Function declaration, 6-32 Functions a r i t hm e tic, 6 -1 3 Boolean, 6-14 transfer, 6-15 GET procedure, 1-7, 6-5, 7-6 GLOBAL, 6-29, 6-32 Global file, 2-2S GOTO statement, 1-6, 4-3, 5-13 Greater than, 1-8 Greater than or equal, 1-8 HALT procedure, 1-7, 6-5 Heading, 1-2, 1-4 /HELP command, 8-5 HELP command, 9-10 Hexadecimal notation, 2-2 I/O errors, A-2 Identifier, 1-2, 1-7 IF statement, 1-6 IF-THEN statement, 5-4 IF-THEN-ELSE statement, 5-4, 5-5 IN, 1-6 %INCLUDE directive, 1-10 Included file, 1-10 Index, 2-8 Initial value, 5-8 Initializing a variable, 4-6 an array, 2-12 Initializing a variable, 4-7 INPUT, 1-7, 4-2 Input, 7-1 Input procedure, 6-5 INTEGER data type, 1-7, 2-2 Internal file, 2-25 LABEL, 1-6, 4-1, 4-1 Label, 5-13 Label declaration, 4-3 Less than, 1-8 Less than or equal, 1-8 Lexical elements, 1-5 LINELIMIT procedure, 1-7, 6-5, 7-7 LIST, 7-11 /LISTING switch, 8-7 , 8-9, 8-11 LN function, 1-7, 6-13 LOAD command, 8-16, 9-1 Loading a program, 8-16 Local file, 2-25 Logical expression, 1-5 Logical operator, 3-1, 3-5 Loops, 5-8 Lower limit, 2-6 /MACHINE-CODE switch, 8-7, 8-9 Mark procedure, 6-5 MAXINT, 1-7, 2-3 Mechanism specifier, 6-21 '~inus sign, 1-8 MOD operator, 1-6 '~ODULE, 1-6, 6-37 I~odul es, t) -3 7 Multidimensional array, 2-9 Multiplication, 1-8 /NATIONAL switch, 8-7, 8--9 NEW procedure, 1-7, f)-5, 6-6 NIL, 1-6 NOCARRIAGE, 7-11 Not equal, 1-8 NOT operator, 1-6, 3-5 -G- -8- -I- -L- -M- -N- -0- Octal notation, 2-2 ODD function, 1-7, 6-14 OF, 1-6 OPEN procedure, 1-7, 6-5, 7-8 Operator, 3-1 AND, 1-6, 3-5 arithmetic, 1-8, 3-1 ass ignmen t, 1-8 DIV, 1-6 logical, 3-1 MOD, 1-6 NOT, 1-6, 3-5 OR, 1-6, 3-5 relational, 1-8, 2-11, 3-1, 3-4 REM, 1-6 set, 1-8, 3-1, 3-5 sub range , 1-8 OR operator. 1-6, 3-5 Index--3
- 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: INDEX /ABORT switch, 8-7 ABS functi
- Page 253: INDEX (Co n t. ) Set operator, 1-8,
- Page 256: - Do Not Tear - Fold Here and Tape