Changes

Jump to: navigation, search

Locomotive BASIC

5,768 bytes added, 11:10, 8 January 2019
/* Functions */
: '''Table of ERRor codes''':
<pre>
========================================================================================| VALUE | NAME | DESCRIPTION |========================================================================================| 1 |Unexpected NEXT |A NEXT command has been encountered while not in a || | |FOR loop, or the control variable in the NEXT || | |command does not match that in the FOR. || 2 |Syntax Error |BASIC cannot understand the given line because || | |a construct within it is not legal. || 3 |Unexpected RETURN |A RETURN command has been encountered when not in a || | |subroutine. || 4 |DATA exhausted |A READ command has attempted to read beyond the end || | |of the last DATA. || 5 |Improper Argument |This is a general purpose error. The value of a || | |function's argument, or a command parameter is || | |invalid in some way. || 6 |Overflow |The result of an arithmetic operation has over- || | |flowed. This may be a floating point overflow, in || | |which case some operation has yielded a value || | |greater than 1.7E^38 (approx.). Alternatively, this || | |may be the result of a failed attempt to change a || | |floating point number to a 16 bit signed integer. || 7 |Memory full |The current program or its variables may be simply || | | too big, or the control structure is too deeply || | | nested (nested GOUSBs, WHILEs or FORs). || | |A MEMORY command will give this error if an attempt || | |is made to set the top of BASIC's memory too low, or|| | |to an impossible high value. Note that an open file || | |has a buffer allocated to it, and that may restrict || | |the values that MEMORY may use. || 8 |Line does not exist |The line referenced cannot be found. || 9 |Subcript out of range |One of the subscripts in an array reference is too || | |big or too small. || 10 |Array already dimensioned|One of the arrays in a DIM statement has already || | |been declared. || 11 |Division by zero |May occur in real division, integer division, || | |integer modulus or exponentiation. | | 12 |Invalid direct command |The last command attempted is not valid in direct || | |mode. || 13 |Type mismatch |A numeric value has been presented where a string || | |value is required or vice versa, or an invalidly || | |formed number has been found in READ or INPUT. || 14 |String space full |So many strings have been created that there is no || | |further room available, even after 'garbage || | |collection'. || 15 |String too long |Strings exceeds 255 characters in length. May be || | |generated by appending strings together. || 16 |String expression too |String expressions may generate a number of || |complex | intermediate string values. When the number of these|| | |values exceeds a reasonable limit, this error || | |results. || 17 |Cannot CONTinue |For one reason or another the current program || | |be restarted using CONT. Note that CONT is intended || | |for restarting after a STOP command, [ESC][ESC], || | |or an error, and that any alteration of the || | |program in the meantime makes a restart impossible. || 18 |Unknown user function |No DEF FN has been executed for the FN just || | |invoked. || 19 |RESUME missing |The end of the program has been encountered while || | |in error processing mode (i.e. in an ON ERROR GOTO || | |routine). || 20 |Unexpected RESUME |RESUME is only valid while in error processing mode || | |(i.e. in an ON ERROR GOTO routine). || 21 |Direct command found |When loading a file, a line without a line number || | |has been found. || 22 |Operand missing |BASIC has encountered an incomplete expression. || 23 |Line too long |A line when converted to BASIC internal-form becomes|| | |too big. || 24 |EOF met | An attempt has been made to read past end of the || | |file input stream. || 25 |File type error |The file being read is not of a suitable type. || | |OPENIN is only prepared to open ASCII text files. || | |Similarly, LOAD, RUN, etc, are only prepared to || | |deal with file types produces by SAVE. || 26 |NEXT missing |Cannot find a NEXT to match a FOR command. A line || | |number accompanying this message indicates the FOR || | |command to which this error applies. || 27 |File already open |An OPENIN or OPENOUT command has been executed || | |before the previously opened file has been closed. || 28 |Unknown command |BASIC cannot find a taker for an external command, || | |i.e. a command preceded by a bar |. || 29 |WEND missing |Cannot find a WEND to match a WHILE command. || 30 |Unexpected WEND |Encountered a WEND when not in a WHILE loop, or a || | |WEND that does not match the current WHILE loop. || 31 |File not open |(see 'Disc ERRors above). || 32 |Broken in |(see 'Disc ERRors above). |========================================================================================
</pre>
205
edits