Changes

Locomotive BASIC

83 bytes removed, 19:22, 29 April 2013
/* Error codes */
== Error codes ==
* 1 # '''Unexpected NEXT''' - <code>NEXT</code> encountered without matching <code>FOR</code>.* 2 # '''Syntax Error''' - Typing error or incorrect punctuation.* 3 # '''Unexpected RETURN''' - <code>RETURN</code> encountered when there was no active <code>GOSUB</code>.* 4 # '''DATA exhaused''' - Trying to <code>READ</code> data when data pointer has reached end of data.* 5 # '''Improper argument''' - The argument for a function is not legal (e.g. <code>PRINT SQR(-10)</code>).* 6 # '''Overflow''' - The computer cannot handle integers smaller than -32768 (signed) or larger than 65535 (unsigned) or floating point numbers greater than &plusmn;1.7E38.* 7 # '''Memory full''' - Not enough free RAM available to complete the operation. Program too big or control structures too deeply nested.* 8 # '''Line does not exist''' - Attempt to <code>RUN</code>, <code>GOTO</code> or <code>GOSUB</code> a non-existent line number.* 9 # '''Subscript out of range''' - Value of a subscript in an array is outside of range specified by <code>DIM</code> declaration or wrong number of dimensions supplied.* 10 # '''Array already dimensioned''' - Arrays can only be <code>DIM</code>ensioned once within a program.* 11 # '''Division by zero''' - Trying to divide a number by zero.* 12 # '''Invalid direct command''' - Using a statement as a direct command which is not allowed outside a program, e.g. <code>DEF FN</code>.* 13 # '''Type mismatch''' - Wrong data type encountered, string data instead of numeric value or vice versa.* 14 # '''String space full''' - String memory area is full.* 15 # '''String too long''' - String may not exceed 256 characters.* 16 # '''String expression too complex''' - A string expression needs to be broken down into smaller expressions.* 17 # '''Cannot CONTinue''' - <code>CONT</code> can only be used if program was stopped by [ESC] or a <code>STOP</code> in program - not after END. If the program is modified before issuing <code>CONT</code> you will also get this error.* 18 # '''Unknown user function''' - A <code>DEF FN</code> must be executed before calling an <code>FN</code> function.* 19 # '''RESUME missing''' - End of program has been reached while in error processing mode. Use <code>ON ERROR GOTO</code> before <code>RESUME</code>.* 20 # '''Unexpected RESUME''' - <code>RESUME</code> is only used in error processing mode, <code>ON ERROR GOTO</code> statement must be used first.* 21 # '''Direct Command found''' - A line without a line number has found while loading a file.* 22 # '''Operand missing''' - An incomplete expression has been found.* 23 # '''Line too long''' - The line contains too many statements.* 24 # '''EOF met''' - Trying to input data beyond end of data file.* 25 # '''FILE type error''' - Using a program file instead of a data file to read or write (or vice versa).* 26 # '''NEXT missing''' - The <code>NEXT</code> of a <code>FOR</code> ... <code>NEXT</code> loop is missing.* 27 # '''File already open''' - Trying to open an open file. Use <code>CLOSEIN</code> or <code>CLOSEOUT</code> first.* 28 # '''Unknown command''' - Given when an unknown command follows a <code>|</code>. e.g. <code>|DISC</code> on a CPC464 without AMSDOS installed.* 29 # '''WEND missing''' - The <code>WEND</code> part of the <code>WHILE</code> ... <code>WEND</code> loop is missing.* 30 # '''Unexpected WEND''' - <code>WEND</code> encountered without a corresponding active <code>WHILE</code>.* 31 # '''File not open''' - Attempting to read from or write to a file without <code>OPEN</code>ing it first.
* '''Unknown error''' - Executing <code>ERROR</code> command with any other legal error code number (up to 255).
 
== Other Basic Dialects available for the CPC ==
1,018
edits