APPENDIX B: Implementation Notes

KEY This section will be expanded shortly.

EMAS IMP80

KEY

Compile-time errors

KEY The IMP compiler can generate any of the following messages while compiling a program. The following points should be noted: * The symbols '#' and '##' appearing in any of the messages below are replaced by appropriate integer values when the message is output by the compiler. * The symbols '&' and '&&' appearing in any of the messages below are replaced by appropriate names (of program variables, routines, switches, etc.) when the message is output by the compiler. * Messages numbered 1-100 relate to standard compile-time errors. Messages numbered 101-200 relate to various compile-time limits (compiler table sizes, etc.) being exceeded. Messages with numbers greater than 200 are warnings - they do not in themselves indicate an error in the program being compiled.
1 %repeat is not required 2 Label & has already been set in this block 4 & is not a Switch name at current textual level 5 Switch name & in expression or assignment 6 Switch label &(#) set a second time 7 Name & has already been declared 8 Routine or fn & has more parameters than specified 9 Parameter # of & differs in type from specification 10 Routine or fn & has fewer parameters than specified 11 Label & referenced at line # has not been set 12 %cycle at line # has two control clauses 13 %repeat for %cycle at line # is missing 14 %end is not required 15 # %ends are missing 16 Name & has not been declared 17 Name & does not require parameters or subscripts 18 # too few parameters provided for & 19 # too many parameters provided for & 20 # too few subscripts provided for array & 21 # too many subscripts provided for array &
22 Actual parameter # of & conflicts with specification 23 Routine name & in an expression 24 Integer operator has real operands 25 Real expression in integer context 26 # is not a valid %event number 27 & is not a routine name 28 Routine or fn & has specification but no body 29 %function name & not in expression 30 %return outwith routine body 31 %result outwith fn or map body 34 Too many textual levels 37 Array & has too many dimensions 38 Array & has upper bound # less than lower bound 39 Size of Array & is more than X'FFFFFF' bytes 40 Declaration is not at head of block 41 Constant cannot be evaluated at compile time 42 # is an invalid repetition factor 43 %constant name & not in expression 44 Invalid constant initialising & after # items 45 Array initialising items expected ## items given #
46 Invalid %external, %extrinsic or variable %spec 47 %else already given at line # 48 %else invalid after %on %event 49 Attempt to initialise %extrinsic or %format & 50 Subscript of # is outwith the bounds of & 51 %finish is not required 52 %repeat instead of %finish for %start at line # 53 %finish for %start at line # is missing 54 %exit outwith %cycle %repeat body 55 %continue outwith %cycle %repeat body 56 %externalroutine & at wrong textual level 57 Executable statement found at textual level zero 58 Program among external routines 59 %finish instead of %repeat for %cycle at line # 61 Name & has already been used in this %format 62 & is not a %record or %record %format name 63 %record length is greater than # bytes 64 Name & requires a subname in this context 65 Subname & is not in the %record %format 66 Expression assigned to record &
67 Records && and & have different formats 69 Subname && is attached to & which is not of type %record 70 String declaration has invalid max length of # 71 & is not a string variable 72 Arithmetic operator in a string expression 73 Arithmetic constant in a string-expression 74 Resolution is not the correct format 75 String expression contains a sub expression 76 String variable & in arithmetic expression 77 String constant in arithmetic expression 78 String operator '.' in arithmetic expression 80 Pointer variable & compared with expression 81 Pointer variable & equivalenced to expression 82 & is not a pointer name 83 && and & are not equivalent in type 86 Global pointer && equivalenced to local & 87 %format name & use in expression 90 Untyped name & used in expression 91 %for control variable & not integer 92 %for clause has zero step
93 %for clause has noninteger number of traverses 95 Name & not valid in assembler 96 Operand # not valid in assembler 97 Assembler construction not valid 101 Source line has too many continuations 102 Workfile of # Kbytes is too small 103 Dictionary completely full 104 Dictionary completely full 105 Too many textual levels 106 String constant too long 107 Compiler tables are completely full 108 Condition too complicated 109 Compiler inconsistent 201 Long integers are inefficient as subscripts 202 Name & not used 203 Label & not used 204 Global %for control variable & 205 Name & not addressable 206 Semicolon in comment text 255 Unexpected fault - consult ERCC Advisory Service

Miscellaneous notes

KEY <To follow.>

IMP77

KEY To follow