Difference between revisions of "BASIC error messages"
m (1 revision) |
m (Updated formatting.) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Programming]][[Category:BASIC]] | [[Category:Programming]][[Category:BASIC]] | ||
+ | <div class="mw-widebody"> | ||
+ | Error numbers < 128 (ie, b7=0) are language errors. Error numers > 127 (ie b7=1) | ||
+ | are non-language (ie MOS, filing system, utility, etc.) errors. As BASIC's errors | ||
+ | are all <64, any error numbers used with a program for its own purposes should | ||
+ | be 64-127. | ||
+ | |||
6502 BASIC ARM BASIC Windows BASIC | 6502 BASIC ARM BASIC Windows BASIC | ||
---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ||
Line 62: | Line 68: | ||
1E 30 Bad call Bad call of function/procedure Bad call | 1E 30 Bad call Bad call of function/procedure Bad call | ||
1F 31 Arguments Arguments to function/procedure incorrect | 1F 31 Arguments Arguments to function/procedure incorrect | ||
− | + | Invalid RETURN actual parameter Incorrect arguments | |
− | Invalid RETURN actual parameter | ||
Invalid array actual parameter | Invalid array actual parameter | ||
20 32 No FOR Not in a FOR loop Not in a FOR loop | 20 32 No FOR Not in a FOR loop Not in a FOR loop | ||
Line 104: | Line 109: | ||
40 64 | 40 64 | ||
41 65 | 41 65 | ||
− | : : | + | : : User error numbers with BASIC programs |
7E 126 | 7E 126 | ||
7F 127 | 7F 127 | ||
− | + | </div> | |
==See also== | ==See also== | ||
+ | * [[Error messages]] | ||
* [[BASIC error messages]] | * [[BASIC error messages]] | ||
* [[System error messages]] | * [[System error messages]] | ||
− | * [[ | + | * [[6502 routines|Generating sideways ROM errors]] |
+ | * [[Catching errors]] | ||
* [[Talk:Error_messages|Discussion on new error numbers]] | * [[Talk:Error_messages|Discussion on new error numbers]] |
Latest revision as of 20:09, 20 August 2023
Error numbers < 128 (ie, b7=0) are language errors. Error numers > 127 (ie b7=1) are non-language (ie MOS, filing system, utility, etc.) errors. As BASIC's errors are all <64, any error numbers used with a program for its own purposes should be 64-127.
6502 BASIC ARM BASIC Windows BASIC ---------------------------------------------------------------------------------------- 00 0 No room No room No room 01 1 Out of range No such mnemonic Jump out of range No such suffix 02 2 Byte Bad immediate constant Size needed Bad address offset Bad shift register 03 3 Index Duplicate register in multiply Multiple label 04 4 Mistake Mistake Mistake Missing = Missing = in FOR statement 05 5 Missing , Missing , Missing , 06 6 Type mismatch Type mismatch: number needed Type mismatch Type mismatch: string needed Type mismatch: array needed Can't addign to array of this size Can't SWAP different types 07 7 No FN Not in a function Not in a function 08 8 $ range Too low a value for $<number> Address out of range 09 9 Missing " Missing " Missing " 0A 10 Bad DIM Bad DIM statement Bad DIM statement Impossible dimension DIM() function needs an array No room to do matrix multiplication No end of dimension list Can't DIM negative amount Arrays cannot be redimensioned 0B 11 DIM space No room for this DIM DIM space No room for this dimension 0C 12 Not LOCAL Not in a FN or PROC Items can only be made local in a function or procedure 0D 13 No PROC Not in a procedure Not in a procedure 0E 14 Array Unknown array Bad use of array Unknown array in DIM() function Undimensioned array 0F 15 Subscript Subscript out of range Bad subscript Incorrect number of subscripts 10 16 Syntax error Syntax error Syntax error 11 17 Escape Escape Escape 12 18 Division by zero Division by zero Division by zero 13 19 String too long String too long String too long 14 20 Too big Number too big Number too big Number too big for Sine or Cosine 15 21 -ve root Negative root Negative root 16 22 Log range Logarithm range Logarithm error 17 23 Accurancy lost Accuracy lost in Sine/Cosine/Tangent Accuracy lost 18 24 Exp range Exponent range Exponent range 19 25 Bad MODE Bad MODE 1A 26 No such variable Unknown variable or missing variable No such variable Can't use array reference here 1B 27 Missing ) Missing ) Missing ) Missing ( Missing ] Missing { Missing } 1C 28 Bad HEX Bad Hex Bad hex or binary Hex number too large Bad binary 1D 29 No such FN/PROC No such function/procedure No such FN/PROC 1E 30 Bad call Bad call of function/procedure Bad call 1F 31 Arguments Arguments to function/procedure incorrect Invalid RETURN actual parameter Incorrect arguments Invalid array actual parameter 20 32 No FOR Not in a FOR loop Not in a FOR loop 21 33 Can't match FOR Can't match FOR Can't match FOR 22 34 FOR variable Bad FOR control variable Bad FOR variable 23 35 Too many FORs The step cannot be zero STEP cannot be zero 24 36 Missing TO Missing TO Missing TO 25 37 Too many GOSUBs No room for function/procedure call Missing OF 26 38 No GOSUB Not in a subroutine Not in a subroutine 27 39 ON syntax ON syntax ON syntax 28 40 ON range ON range ON range 29 41 No such line No such line No such line 2A 42 Out of DATA Out of data Out of data 2B 43 No REPEAT Not in a REPEAT loop Not in a REPEAT loop 2C 44 Too many REPEATs Too many nested structures WHEN/OTHERWISE not first 2D 45 Missing # Missing # Missing # 2E 46 Not in a WHILE loop Not in a WHILE loop 2F 47 Missing ENDCASE Missing ENDCASE 30 48 OF missing from CASE statememt OF not last CASE OF statement must be the last thing on a line 31 49 Missing ENDIF Missing ENDIF 32 50 Bad MOUSE variable Bad MOUSE variable 33 51 Too many input expressions for SYS No such system call Too many output variables for SYS 34 52 Can't install library Bad library Bad program used as function/procedure library No room for library 35 53 Size mismatch 36 54 DATA not LOCAL 37 55 Missing \ 38 56 Bad use of structure 39 57 3A 58 3B 59 3C 60 3D 61 3E 62 3F 63 40 64 41 65 : : User error numbers with BASIC programs 7E 126 7F 127