Error Messages As far as is possible, this interpreter conforms to the standard numbering system for error messages. Messages which may be produced by this interpreter are as follows (explanations are omitted when the meaning is obvious): Failure returns (negative) -3 Error loading program A message indicating the reason will usually be displayed immediately before this message. -1 Initialisation error A failure in some essential service, such as not being able to start up the stack process. Alternatively, some error occurred while processing the commandline arguments (in which case an explanation follows the message text). Standard REXX errors (1-50) 4 Program interrupted Control-C has been typed, or a SIGHUP or SIGTERM signal has been received. 5 Machine storage exhausted 6 Unmatched '/*' or quote (this is reported as the program is loaded, before execution. The line number given corresponds to the start of the string or comment which is unterminated. Alternatively, the error may occur during an INTERPRET instruction, in which case the INTERPRET instruction itself is named. This also applies to errors 13 and 37). 7 Expected WHEN/OTHERWISE Either a SELECT is not followed immediately by a WHEN, or the end of the SELECT structure has been reached, no condition was true, and no OTHERWISE clause is present. 8 Unexpected THEN/ELSE 9 Unexpected WHEN/OTHERWISE 10 Unexpected or unmatched END 13 Invalid character in program: [char] The only characters which are allowed in program text (excluding comments and string constants) are spaces, tabs, newlines, the alphanumerics (A-Z, a-z, 0-9) and the symbols: @#.?!_$|&*()-+=^\'";:<,>%/ (see also error 6) 14 Incomplete DO/SELECT/IF An END is probably missing. 15 Invalid binary or hexadecimal string 16 Label not found: [label] The target of a SIGNAL (whether explicit or caused by a trap) is missing. 17 Unexpected PROCEDURE The PROCEDURE instruction should only be placed directly after the entry point of a function. 18 Expected THEN 19 String or symbol expected A string or symbol was expected (e.g. after SIGNAL or NUMERIC FORM) but was missing or invalid. 20 Symbol expected A symbol was expected (e.g. after PARSE VAR or, optionally, after LEAVE or ITERATE) but was missing or invalid. 21 Invalid data on end of clause Extra characters were found when the interpreter expected a line end or a semicolon. In the special case of the END instruction, the symbol (or SELECT) appearing after the END did not match up with the beginning of the structure being ended. 24 Invalid TRACE request 25 Invalid subkeyword found In an instruction such as NUMERIC which requires a subkeyword (e.g. NUMERIC DIGITS, etc), that subkeyword was missing or invalid. 26 Invalid whole number A function call or an instruction required an integer expression, but either a non-integer or an out-of-range number was supplied. The magnitude of a whole number should not exceed 1999999999. 27 Invalid DO syntax 28 Invalid LEAVE or ITERATE A symbol specified after LEAVE or ITERATE was either invalid or did not correspond to an active loop, or there is no loop currently active. 30 Symbol > [nnn] characters A variable name exceeded the implementation limit. 31 Name starts with number or '.' The name in this case will be a symbol which is being given a value in an attempted assignment. 35 Invalid expression A syntax error occurred during the evaluation of an expression. This error also sometimes results when an expression is missing. 36 Unmatched '(' 37 Unexpected ',' or ')' When reported during loading or before interpreting a string (see error 6), this means that a comma occurred at the end of a line which has no successor. At other times, it means that either an unmatched right parenthesis was found or that a comma was found in an inappropriate position (such as in SAY 1,2) 38 Invalid template A PARSE instruction has invalid syntax. 39 Evaluation stack overflow (> [nn] pending operations) An expression was too complex to evaluate. This usually only occurs if there is a large number of successive prefix operations, such as in: say ++++++++++++++++++++++++++++1. 40 Incorrect call to routine A call to a function or subroutine specified the wrong number of parameters, or missed out a mandatory parameter, or supplied an inappropriate parameter for the function. 41 Bad arithmetic conversion An arithmetic operator was used on a string which is not a number. 42 Arithmetic overflow or underflow 43 Routine not found: [name] 44 Function did not return data When the caller of a function discovers that it did not return anything, this error is raised. 45 No data specified on function RETURN When a Rexx program or subroutine was called as a function, RETURN must be followed by an expression or the RETURN instruction will raise this error. 47 Unexpected label A label was present in the expression following INTERPRET. 48 Failure in system service This indicates either that a communication error occurred whilst dealing with the stack, or that an error occurred whilst trying to load a ".rxfn" file to call an external function. 49 Implementation error The REXX interpreter has discovered a bug in itself, since some internal structure is inconsistent. Naturally, you will never see this message. ;-) Implementation-defined errors (80-99) 80 No-value error This is the value to which the special variable rc is set when a SIGNAL ON NOVALUE trap is activated. 81 Use of an un-implemented feature! 82 Syntax error A syntax error has been discovered which cannot be described by any of the other messages (This message should never appear except when a LOCAL feature is being used). 83 Label ends with '.' (this error is reported as the program is read in) Labels ending with '.' are disallowed since a program containing such a label may be unaware that foo.(3) is not a call to the function "foo." but a reference to a compound symbol. 84 Too many arguments (> [nn]) A call to a function or subroutine specified too many actual parameters for the interpreter to handle. 85 ERROR condition occurred This code is used internally when a "SIGNAL ON ERROR" occurs. You may see this message if the signal handler does not exist. 86 FAILURE condition occurred This code is used internally when a "SIGNAL ON FAILURE" occurs. You may see this message if the signal handler does not exist. 88 Unexpected '*/' This "error" is no longer used. Unix system errors (101-198) These are the error messages which may result from a call to stream() with the "Describe" option. They are defined by the Unix run-time library, and include such messages as "Permission denied" and "No such file or directory". The number of the message is just 100 plus its usual value in Unix. Other I/O errors (100,199-210) These are the error messages which may result from a call to stream() with the "Describe" option and which are provided by the interpreter rather than by the system. 100 Unknown error occurred during I/O An error occurred, but the system call failed to set errno to a meaningful value. 199 End of file 200 File position was out of bounds REXX level 4.00 does not allow you to use charin or linein to point to a non-existent character, or to use charout or lineout to point more than one byte beyond the end of file. If you attempt this, then NOTREADY will be raised with this error. 201 Reposition attempted on transient stream REXX does not allow you to reposition a stream unless it is a persistent stream (i.e., a regular file). Repositioning on a pipe or tty is not allowed and will raise NOTREADY with this error. 202 Write attempted on a read-only stream This error occurs if you try to write to stdin, or to any stream which was opened via the stream function without a name in read mode (for instance, with popen or fdopen).