(*** PAGE 476 *** misp-492.png **********************************************) # Appendix: Error Messages A complete list of the error codes and messages used by the Model Implementation follows. In the file ErrorFile used by the Compiler and Postmortem Generator these messages are held in fixed format, two lines per potential error code, but for publication purposes they have been reformatted here. 1 A digit-sequence was expected: an unsigned-real is badly formed. 2 A string-quote was expected: a string is not permitted to extend over more than one physical line. 3 One or more characters were expected: an empty string is not permitted. 4 A token-separator (comment, space, or line-separator) is required between numbers and word-symbols. 10 An identifer symbol was expected. 11 An integer-constant was expected. 17 Either a "*" or a "/" symbol was expected. 18 Either a "+" or a "-" symbol was expected. 19 A "<", "<=", "=", ">=", or ">" symbol was expected. 20 A ")" symbol was expected. 21 A ")" symbol was expected. 22 A "[" symbol was expected. 23 A "]" symbol was expected. 24 A "," symbol was expected. 25 A ";" symbol was expected. 26 A ".""symbol was expected. 28 A ":" symbol was expected. 29 A ":=" symbol was expected. 30 A ".." symbol was expected. 42 A "begin" symbol was expected. (*** PAGE 477 *** misp-493.png **********************************************) 50 An "end symbol was expected. 51 A "then" symbol was expected. 53 An "until" symbol was expected. 54 An "of" symbol was expected. 55 A "do" symbol was expected. 56 A "to" or "downto" symbol was expected. 57 A "program" symbol was expected. 58 Other symbols were expected. 59 Previous symbols were unexpected: input skipped to this symbol. 60 An "=" symbol was expected. 100 The identifier has not been declared as a field identifier for this record-type. 101 The identifier has not been declared. 102 The identifier has already been declared or used in this scope. 103 The identifier is being misused in this context. 104 The identifier does not denote a type in this context. 106 A Boolean-type is required. 107 An integer-type is required. 108 A real-type is required. 109 An integer or a real-type is required. 110 An ordinal-type is required. 112 A pointer-type is required. 113 An array-type is required. 115 A record-type is required. 116 A set-type is required. 117 A file-type is required. 120 Only a constant or constant-identifier that has real] or integer type may be signed. 121 An integer or real constant or constant-identifier was expected. 122 The constants defining a subrange-type must have the same ordinal-type. 123 The first value of a subrange-type must be less than or equal to the second value. 124 The case-constant must be type-compatible with the tag type. 125 The value of the case-constant must belong to the set of values defined by the tag-type. 126 An identical case-constant has already occurred in this variant-part. 127 The number of case-labels must be equal] to the number of values of the tag-type. 128 The component-type of a file must not be a file-type, or a type containing a component file-type. (*** PAGE 478 *** misp-494.png **********************************************) 130 The label has not been declared. 131 The label was declared local to the block, but never sited within the corresponding statement-part. 132 An identical label has already been declared in this label-declaration-part. 133 A label must be sited in the block which contains its declaration. 134 The label has already been sited in this block. 135 The label is not accessible from a preceding goto statement that references it. 136 The label is not accessible from this goto statement. 137 The vatue of the label must be greater than or equal to 0, and less than or equal to 9999. 140 The identification of a "forward" procedure or function must not contain a formal parameter list. 141 The identification of a "forward" function must not contain a function result-type. 142 The result-type of a function must have an ordinal, real, or pointer-type. 143 The function result type-identifier was expected. 144 A function or procedure identification was expected: a duplicate "forward" directive is not permitted. 145 A formal value parameter must not have a file-type, or a type that contains a component file-type. 146 A result-value must be assigned to the function identifier. 147 Assignment to the identifier of a standard-function is not permitted. 148 Assignment to a formal function-parameter identifier is not permitted. 149 Use of a function identifier is not permitted in this context. 150 Assignment of a value having a file-type, or a type that contains a component file-type, is not permitted. 151 The identification of a "forward" procedure or function is missing. 152 The expression is not assignment compatible with the destination variable or parameter. 153 The value of the control-variable of a for-statement is "threatened": the statement is not permitted. 154 The directive is not recognized: only "forward" is allowed. 160 The index-expression is not type-compatible with the index-type of the array-variable. 161 A record-variable or file-variable was expected in this context. 162 Only the first parameter of read, readln, write, or writeln, is permitted to be a file variable. 163 Only integer, real, or character values can be read from a textfile. 164 Only integer, real, Boolean, character, or string-values can be written to a textfile. (*** PAGE 479 *** misp-495.png **********************************************) 165 The expression denoting "totalwidth" of a write or writeln procedure must have integer-type. 166 The expression denoting "fracdigits" in a write or writeln parameter-list must have integer-type. 167 An expression must have real-type if it is to be written using fixed-point format. 168 The parameter to the standard procedure "page" must be a textfile. 169 The array variable must be packed. 170 The array variable must be unpacked. 171 The elements of the packed and unpacked arrays must have the same type. 172 The indexing-expression must be type-compatible with the index-type of the unpacked array variable. 173 The case-constant does not occur in the definition of the corresponding variant-part of the record. 174 The case-constant must be type-compatible with the tag type of the corresponding variant-part. 176 The parameter to the standard function "eoln" must be a textfile. 177 The file parameter in a call to the standard procedure "readln" must be a textfile. 178 The file parameter in a call to the standard procedure "writeln" must be a textfile. A standard procedure is not permitted as an actual procedure parameter. 181 A standard function is not permitted as an actual function parameter. 182 The formal parameter lists of the actual and formal procedures must match. 183 The formal parameter lists and result types of the actual and formal functions must match. 184 An actual variable parameter must not be a component of a packed-variable. 185 An actual variable parameter must not be a tag-field. 186 An actual variable parameter and its corresponding formal parameter must have identical types. 187 The number of actual parameters is not equal to the number of formal parameters. 190 The operator is not compatible with the operand-type. 191 Both operands must have set-types, and both set-types must have compatible base-types. 192 The expression-type is not compatible with the base-type of the set. 193 The operand expressions must both have real-type. 194 The operand expressions must both have integer-type. 195 The operand expressions must both have Boolean-type. 196 Signed operand expressions must have integer or real types. 197 The variable or expression is not type-compatible with the base-type of the set. (*** PAGE 480 *** misp-496.png **********************************************) 198 The operand expressions of a relational expression are not type-compatible. 199 Only "=" and "<>" operators are permitted in a relational expression containing pointer operands. 200 Only "=', "<=", ">=", and "<>" are permitted in a relational expression containing set operands. 201 Only array-variables which have the string-type may appear as operands in a relational expression. 202 The variables are not permitted as operands in a relational expression. 210 A case-constant with an identical value has already been encountered in this case-statement. 211 The case-constant must have the same ordinal-type as the case-index. 220 A non-local variable must not be used as the control-variable of a for-statement. 221 A formal variable or value parameter must not be used as the control-variable of a for-statement. 222 The control-variable is "threatened" by assignment in a procedure or function in this block. 223 The initial value of the for-statement is not type compatible with the control-variable. 224 The final value of the for-statement is not type compatible with the control-variable. 225 Nested for-statements must not use the same control variable. 230 An identical identifier has already occurred in the program parameter-list. 231 The program parameter has not been declared in the variable declaration part. 232 The textfile "input" was not included in the program parameter list. 233 The textfile "output" was not included in the program parameter list. 250 Only the innermost dimension of an array schema may be packed. 251 The actual parameter does not conform to the array schema. 252 Actual parameters conforming to the same array schema must have identical types. 253 A conformant array is not permitted as an actual value parameter. 254 Relational operators cannot be applied to conformant array parameters. 301 The index value lies outside the bounds of the array. (D1) 302 The variant field access is inconsistent with the tag-field value, or will destroy an existing reference to the current variant. (D2) 303 A nil pointer cannot be used to reference a variable, or as a parameter to "dispose". (D3,D23) 304 An undefined pointer cannot be used to reference a variable or as a parameter to "dispose". (D4,D24) 305 A dynamic variable cannot be destroyed by "dispose" while a reference to it still exists. (D5) (*** PAGE 481 *** misp-497.png **********************************************) 306 The position of a file cannot be altered while a reference to the buffer variable still exists. (D6) 307 The value of an actual parameter lies outside the interval defined by the type of the formal parameter. (D7) 308 The members of an actual parameter lie outside the interval defined by the base-type of the formal parameter. (D8) 309 A file must be in write-mode immediately prior to any use of "put", "write", "writeln", or "page". (D9) 310 A file variable must be defined immediately prior to any use of "put, "write", or "page". (D10) 311 End-of-file must be true immediately prior to any use of "put', "write", "writeln", or "page". (D11) 312 The file buffer variable must be defined immediately prior to any use of "put". (D12) 313 A file variable must be defined immediately prior to any use of "reset". (D13) 314 A file must be in read-mode immediately prior to any use of "get" or "read". (D14) 315 A file must be defined immediately prior to any use of "get" or "read". (D15) 316 End-of-file must not be true immediately prior to any use of "get" or "read". (D16) 318 For "write", the value of the expression lies outside the range of values defined by the component type of the file. (D18) 319 For a variable created by "new(p,c1,,,cn)", tag-field assignment attempts to select a variant not identified by c1,,,cn. (D19) 320 For "dispose(p)", the dynamic variable was originally created by a call "new(p,c1,,,cn). (D20) 321 For "dispose(p,k1,,,km)", the dynamic variable was originally created by a call "new(p,c1,,,cn)" where m<>n. (D21) 322 For "dispose(p,k1,,,km)", the variants in the dynamic variable are different from those specified by the case-constants. (D22) 325 A dynamic variable created by "new(p,c1,,,cn)", cannot be accessed or referenced as an entire variable "p^". (D25) 326 In "pack", the index value lies outside the bounds of the unpacked array. (D26) 327 In "pack", a component of the unpacked array is accessed but undefined. (D27) 348 In "pack", the upper bound of the unpacked array will be exceeded. (D28) 329 In "unpack", the index value lies outside the bounds of the unpacked array. (D29) 330 In "unpack", a component of the packed array is both undefined and accessed. (D30) 331 In "unpack" the upper bound of the unpacked array will be exceeded. (D31) 332 For integer or real "x", "sqr(x)" would exceed the maximum integer or real value. (D32) 333 For "ln(x)", "x" is zero or negative. (D33) (*** PAGE 482 *** misp-498.png **********************************************) 334 For "sqrt(x)", "x" is negative. (D34) 335 The magnitude of "x" is too large to allow evaluation of "trunc(x)" as defined by the Pascal Standard. (D35) 336 The magnitude of "x" is too large to allow evaluation of "round(x)" as defined by the Pascal Standard. (D36) 337 For "chr(x)", "x" does not identify a character value. (D37) 338 The value of "succ(x)" exceeds the range of values defined by the type of "x". (D38) 339 The value of "pred(x)" precedes the range of values defined by the type of "x". (D39) 340 For "eof(f)", "f" is undefined. (D40) 341 For "eoln(f)", "f" is undefined. (D41) 342 For "eoln(f)", "eof(f)" is already true. (D42) 343 A variable or buffer variable must be assigned a value prior to its use in an expression or in 'put'. (D12,D43) 345 In "x/y", "y" is zero. (D44) 345 In "i div j", "j" is zero. (D45) 346 In "i mod j", "j" is zero or negative. (D46) 347 The result of integer addition, subtraction, or multiplication lies outside the interval [-maxint..+maxint]. (D32,D47) 348 The value of the function is undefined. (D48) 349 An expression value or a value read, lies outside the range of values defined by the variable type. (D17,D18,D49,D55) 350 The members of a set-value lie outside the range of values defined by the base-type of the set variable. (D50) 351 None of the case constants is equal to the value of the case index. (D51) 352 The initial value is Jess than the minimum value of the control variable of the for-statement. (D52) 353 The final value is greater than the maximum value of the control variable of the for-statement. (D53) 354 The sequence of data characters does not form a signed integer number. (D54) 356 The sequence of data characters does not form a signed real number. (D56) 357 The buffer variable is undefined immediately prior to use of "read". (D57) 358 The value of a field-width expression in a write-statement is zero or negative. (D58) 359 The bounds of an actual parameter do not lie within the range defined by the index type of the formal conformant array parameter. (D59) 361 In this implementation, access to the buffer-variable of a file must be preceded by a "reset" or "rewrite" operation on the file. 362 In this implementation, the members of a set must have ordinal values in the range [0..255]. (*** PAGE 483 *** misp-499.png **********************************************) 401 System limit on scopes: no more than 19 block or record scopes can be opened simultaneously. 402 System limit on data size: the data cannot be held in P-machine's 32k-word memory. Reduce or reconfigure. 403 System hmit on code size: the program or procedure block is too large to compile. Reduce or reconfigure. 404 System limit on code labels: no more than 251 procedures, functions and statement labels may be defined in one block. Simplify. 405 System limit on dropout" code: the exit-label cannot be sited within 256 bytes of the dropout branch. Simplify expression. 406 System limit on set-size: sets are limited to a maximum of 256 members. Simplify the base type. 407 System limit on sets: the base type of a set must define values in the range [0..255]. 408 System limit on variant records: with checks on, record variants must not be nested deeper than 9 levels. 411 System limit on memory: insufficient memory for P-machine stack. 412 System limit on memory: insufficient memory for P-machine heap. 413 System limit on calls to "new": with checks on, no more than 2*maxint calls may be made to the standard procedure "new". 414 System limit on files: no more than 16 files may be opened simultaneously. 421 Fatal error: unexpected end of program file. Compilation aborted. 422 Fatal error: P-machine stack underflow. P-machine aborted. 423 Fatal error: P-machine heap corrupt. P-machine aborted. 424 Fatal error: empty code file. P-machine aborted. 425 Fatal error: code file too large to load. P-machine aborted.