GW-Basic Error Codes
|1||NEXT without FOR|
This can also be caused by other mismatched code (eg IF/ENDIF, WHILE/LOOP etc)
A run-time syntax error has been created by a READ statement trying to load string data into a numeric variable. Other syntax errors are caught by the compiler.
|3||RETURN without GOSUB|
A RETURN was encountered without a matching GOSUB; that is, there is nothing to RETURN from.
|4||Out of DATA|
A READ statement ran out of DATA statement values.
|5||Illegal function call|
This is a catch-all error related to passing an inappropriate argument to some statement or function. A few of the 101 things that can cause it:
An overflow is the result of a calculation producing a value too large to be represented in the indicated numeric type. For example, x% = 32767 + 1 causes overflow because 32,768 can't be represented by an integer. Integer overflow error is not caught unless a program is compiled with the Overflow switch turned on in the Options menus; floating-point overflow is always caught.
|7||Out of memory|
Many different situations can cause this message, including dimensioning too large an array.
|8||Label not defined|
|9||Subscript out of range|
You attempted to use a subscript larger than the maximum value established when the array was DIMensioned. This error is not reported unless the compiler Options' Bounds switch is turned on.
You attempted to dynamically dimension an array for the second time, without first erasing it.
|11||Division by zero|
You attempted to divide by zero or to raise zero to a negative power.
|12||Illegal in direct mode|
You used a string value where a numeric value was expected or vice versa. This can occur in PRINT USING, DRAW, or PLAY statements.
|14||Out of string space|
String storage space is exhausted; string memory is limited to 64K.
|15||String Too Long|
The string produced by a string expression is longer than 32,767 bytes.
|16||String formula too complex|
|18||Function not defined|
Program execution ran to the physical end of the program while in an error-trapping routine. There may be a missing RESUME statement in an error handler.
|20||RESUME without error|
You executed a RESUME statement without an error occurring; that is, there is no error-handling subroutine to RESUME from.
The specified time-out value for a communication status line has expired. Time-out values can be specified for the ClearToSend, CarrierDetect, and DataSetReady status lines. The program should either abort execution or retry the communications operation. (See the OPEN COM statement in Chapter 5 for further information.)
A hardware error has occurred; for example, with the printer interface or a communications adaptor.
|26||FOR without NEXT|
|27||Out of paper|
The printer interface indicates that the printer is out of paper. It may simply be turned off or have some other problem.
|29||WHILE without WEND|
|30||WEND without WHILE|
|35||Subprogram not defined|
|38||Array not defined|
|39||CASE ELSE expected|
Given the file's record length, you attempted to define too long a set of field variables in a FIELD statement.
A malfunction occurred within the Turbo Basic run-time system. Call Borland's Technical Support Group with information about your program.
|52||Bad file name or number|
The file number you gave in a file statement doesn't match one given in an OPEN statement or the file number may be out of the range of valid file numbers.
|53||File not found|
The file name specified could not be found on the indicated drive.
|54||Bad file mode|
You attempted a PUT or a GET (or PUT$ or GET$) on a sequential file.
|55||File already open|
You attempted to open a file that was already open or you tried to delete an open file.
|56||FIELD statement active|
|57||Device I/O error|
A serious hardware problem occurred when trying to carry out some command.
|58||File already exists|
The new name argument specified by the NAME command already exists.
|59||Bad record length|
There isn't enough free space on the indicated or default disk to carry out a file operation. Make sure there is enough free disk space and retry your program.
|62||Input past end of file|
You tried to read more data from a file than it had to read. Use the EOF (end of file) function to avoid this problem. This error can also be caused by trying to read from a sequential file opened for output or append.
|63||Bad record number|
A negative number or one larger than 16,777,215 was specified as the record argument to a random file PUT or GET statement.
|64||Bad file name|
The file name specified in a FILES, KILL, or NAME statement contains invalid characters.
|67||Too many files|
This error can be caused either by trying to create too many files in a drive's root directory or by an invalid file name that affects the performance of DOS's Create File system call.
You tried to OPEN a device file on a machine without that device; for example, COM1: on a system without a serial adaptor or modem.
You executed a statement to INPUT characters into an already full communications buffer. Your program should either check and empty the buffer more often or provide a larger buffer size.
You tried to write to a write-protected disk.
|71||Disk not ready|
The door of a floppy disk drive is open or there is no disk in the indicated drive.
The controller board of a floppy or hard disk indicates a hard media error in one or more sectors.
|73||Advanced feature unavailable|
|74||Rename across disks|
You can't rename a file across disks or directories. A file isn't moved by a NAME statement, it's only given a new title.
|75||Path/File access error|
During a command capable of specifying a path name (OPEN, RENAME, MKDIR, for example), you used a path inappropriately; for example, trying to OPEN a subdirectory or to delete an in-use directory.
|76||Path not found|
The path you specified during a CHDIR, MKDIR, OPEN, and so forth, can't be found.
|PDS adds these|
|82||Table Not Found|
|83||Index Not Found|
|85||No Current Record|
|86||Duplicate Value For Unique Index|
|87||Invalid Operation On Null Index|
|88||Database Needs Repair|
|89||Insufficient Isam Buffers|
|Borland Turbo-Basic DOS adds these|
|201||Out of stack space|
Too many nested gosubs may cause this
|202||Out of string temp space|
A string expression required the use of too many temporary string buffers. This can be caused by an expression like MID$(LEFT$(MID$(RIGHT$(...). Try simplifying your string expressions by storing intermediate results in temporary string variables.
|203||Mismatched common variables|
You attempted to CHAIN between two program segments that did not contain matching COMMON statements. Turbo Basic checks the type and number of variables in COMMON statements.
|204||Mismatched program options|
You attempted to CHAIN between two program segments that were compiled with different program options (different math library, math coprocessor required, and so forth).
|205||Mismatched program revisions|
You attempted to CHAIN between two program segments that were created with different versions of the Turbo Basic compiler.
|206||Invalid program file|
You attempted to CHAIN or RUN a program segment that was not compiled with Turbo Basic.
|242||String/array memory corrupt|
The string memory area has been improperly overwritten. This could be caused by the improper action of an assembler subroutine, string array access outside of the dimensioned limits, or by an error within the Turbo Basic run-time system.
|243||CHAIN/RUN from .EXE file only|
You attempted to CHAIN or RUN a program segment from within the Turbo Basic environment. You must compile your program to disk using the compiler Options menu selection and then execute programs that use CHAIN or RUN from DOS.
|258||Program too big to fit into memory|
Hmm - you're gonna have to break the program down into smaller segments.
|VISBASIC DOS adds these|
|384||Property Can't Be Modified When Form Is Minimised Or Maximised|
|385||Must Specify Index When Using Property Array|
|386||Property Not Available At Run Time|
|387||Property Can't Be Set On This Control|
|400||Form Already Displayed; Can't Show Form Modally|
|401||Can't Show Non-Modal Form When A Modal Form Is Being Displayed|
|402||Must Close Or Hide Topmost Modal Form First|
|403||Mdi Form Cannot Be Shown Modally|
|410||Property Can't Be Modified On Mdi Form|
|420||Invalid Object Reference|
|421||Method Not Applicable For This Object|
|422||Property Not Found|
|423||Property Or Control Not Found|
|425||Invalid Object Use|
|430||No Currently Active Control|
|431||No Currently Active Form|
|480||Can't Create Autoredraw Image
||Borland Turbo-Basic Compiler Errors||401||Expression too complex|
The expression contained too many operators/operands; break it down into two or more simplified expressions.
|402||Statement too complex|
The statement complexity caused an overflow of the internal compiler buffers; break the statement down into two or more simplified statements.
|403||$IF nesting overflow|
Conditional compilation blocks ($IF/$ELSE/$ENDIF) can only be nested up to 16 levels deep.
|404||$INCLUDE nesting overflow|
Include files may be nested up to five levels deep, including the main program itself. That allows the program to have four nested include files.
|405||Block nesting overflow|
Your program has too many statement block structures nested within each other. Turbo Basic block structures may be nested 255 levels deep.
|406||Compiler out of memory|
Available compiler memory for symbol space, buffers, and so on, has been exhausted. If no more memory is available, separate your program into a small main program that uses the $INCLUDE metastatement to include the rest of your program. If you are compiling your program to memory and get this error, try compiling the program to disk with the compiler Options menu.
|407||Program too large|
Your program contains more than 65,530 statements.
|408||Segment exceeds 64K|
Your program contains a segment that exceeds the 64K limitation. Add a $SEGMENT metastatement to your source program to force program code into another segment.
|409||Variables exceed 64K|
Scalar variables are limited to 64K total space. In this space we include pointers to strings, integers, long integers, and single- and double-precision reals. Get rid of any unused variables or split up your program into separate Main and CHAIN programs.
The statement's syntax requires a comma (,).
The statement's syntax requires a semicolon (;).
The statement's syntax requires a right parenthesis (( ).
The statement's syntax requires a left parenthesis ( )).
|414||" = " expected|
The statement's syntax requires an equal sign ( = ).
The statement's syntax requires a hyphen (-).
A Turbo Basic statement was expected. Some character could not be identified as a command, a metacommand, or a variable.
|417||Label/line number expected|
A valid label or line number reference was expected in an IF, GOTO, GOSUB, or ON statement.
|418||Numeric expression requires relational operator|
The compiler has found a string operand in a position where a numeric operator should be.
|419||String expression requires string operand|
The compiler expected a string expression and found something else; for example: X$ = A$ + B
|420||Scalar variable expected|
The compiler expected a scalar variable as a formal parameter to a user-defined function. Scalar variables include strings, integers, long integers, and single and double precision reals.
|421||Array variable expected|
An array variable was expected in a DIM statement or in the graphics GET and PUT statements.
|422||Numeric variable expected|
A numeric variable was expected in an INCR, DECR, or CALL ABSOLUTE offset specification.
|423||String variable expected|
A string variable was expected in a FIELD, GET$, PUT$ or LINE INPUT statement.
A variable was expected in a VARPTR, VARPTR$, or VARSEG function.
|425||Integer constant expected|
An integer constant was expected in a named constant assignment or a conditional compilation $IF/$ELSEIF.
|426||Positive integer constant expected|
A positive integer constant was expected in the array bounds for a DIM STATIC array or in the $COM, $SOUND, and $STACK metastatements.
|427||String constant expected|
A string constant was expected for the file name in an $INCLUDE metastatement.
|428||Numeric scalar variable expected|
Either an integer, long integer, or single- or double-precision real variable is expected; for example, in a FOR/NEXT loop.
|429||Integer scalar variable expected|
An integer variable was expected as a parameter in a CALL ABSOLUTE statement.
|430||Integer array variable expected|
An integer array variable was expected; for example, in a PALETTE statement.
|431||End of line expected|
No characters are allowed on a line (except for a comment) following a metastatement, END SUB, or a statement label.
The AS reserved word is missing in either a FIELD or an OPEN statement. Check the syntax of the FIELD and OPEN statements in Chapter 5.
|433||DEF FN expected|
The compiler found a END FN or EXIT FN statement without a function defined. When defining a function, it must begin with a DEF FN statement.
The compiler found an END IF or an EXIT IF statement without a beginning IF statement defined.
|435||DO LOOP expected|
The compiler found a LOOP or EXIT LOOP statement without a beginning DO statement defined.
When defining a SELECT CASE statement, you either forgot to include the reserved word SELECT or the compiler ran into a END SELECT or EXIT SELECT without a beginning SELECT CASE statement. This error can also occur if you try to use the reserved word CASE as a variable name in your program.
When defining a SELECT CASE statement, you forgot to include the reserved word CASE. This error can also occur if you try to use the reserved word SELECT as a variable name in your program.
|438||FOR LOOP expected|
The compiler found an EXIT FOR statement without a beginning FOR statement defined.
The compiler found an END SUB or EXIT SUB statement without a subprocedure defined. You must define a subprocedure by beginning it with a SUB statement.
|440||END DEF expected|
A function wasn't terminated by a corresponding END DEF statement.
|441||END IF expected|
An IF block wasn't terminated by a corresponding END IF statement.
A DO or WHILE loop was not terminated with a corresponding LOOP or WEND statement.
|443||END SELECT expected|
A SELECT CASE statement was not properly terminated with an END SELECT statement.
|444||END SUB expected|
A procedure was not properly terminated with an END SUB statement.
A FOR loop was not properly terminated with a NEXT statement.
An IF statement is missing its accompanying THEN part.
A FOR statement is missing its accompanying TO part.
An ON statement is missing its accompanying GOSUB part.
An ON statement is missing its accompanying GOTO part.
An $IF conditional compilation metastatement is missing its accompanying $ENDIF. Look for all $IF metastatements and find out where to put the associated $ENDIF
The compiler encountered an $ELSE metastatement that was missing a preceding $IF conditional compilation metastatement. Go back in the source code from the $ELSE and determine where to put the associated $IF.
The compiler encountered an $ENDIF metastatement that was missing a preceding $IF conditional compilation metastatement. Go back in the source code from the $ENDIF and determine where to put the associated $IF.
|453||Undefined name constant|
You used a named constant in your program without defining it. Define the named constant or use a literal constant in the statement.
|454||Undefined function reference|
You used a function name in an expression without defining the function. Check the name of the function for mistakes or provide a definition for the function.
|455||Undefined subprogram reference|
You used CALL to a subprogram, but you did not define the subprogram. Check the name of the subprogram for mistakes or provide the subprogram.
|456||Undefined label/line reference|
You used a line number or label in an IF, GOTO, GOSUB, or ON statement, but you did not define the label or line number. Check the label or line number for mistakes or provide a label.
|457||Undefined array reference|
An array was referenced but was never defined in a DIM statement. Check the array name for mistakes or provide a DIM statement for it.
|458||Duplicate label/line number|
The same line number was used twice or the same statement label name was defined twice. Check your program and any include files for duplicate line numbers or labels and change one or both of them.
|459||Duplicate named constant|
Two named constants were defined with the same name. Check your program and any include files for duplicate names and change one or both of them.
|460||Duplicate function definition|
Two DEF FN functions were defined with the same name. Check your program and any include files for duplicate names and change one or both of them.
|461||Duplicate subprogram definition|
Two SUB procedures were defined with the same name. Check your program and any include files for duplicate names and change one or both of them.
|462||Duplicate common variable|
Two variables with the same name were listed in a COMMON statement. Check your program and any include files for duplicate names and change one or both of them.
|463||Duplicate variable declaration|
Two variables with the same name have been declared with a LOCAL, STATIC, or SHARED statement. Check your program and any include files for duplicate names and change one or both of them.
|464||Duplicate $COM definition|
Only one $COM metastatement for each communications port can be used in your program. Check your program and any include files for $COM definitions and delete one of them.
|465||Duplicate $SOUND definition|
Only one $SOUND metastatement can be used in your program. Check your program and any include files for $ SOUND definitions and delete one of them.
|466||Duplicate $STACK definition|
Only one $STACK metastatement can be used in your program. Check your program and any include files for $ STACK definitions and delete one of them.
|467||Invalid line number|
Line numbers must be in the range to 65535.
|469||Metastatements not allowed here|
Metastatements must be the first statement on the line.
|470||Block/Scanned statements not allowed here|
Block statements like WHILE/WEND, DO/LOOP, and SELECT CASE are not allowed in single line IF statements.
|471||Unknown identifier/ syntax error|
Something is incorrect on the line — the compiler could not determine a proper error message.
|472||Array subscript error|
You dimensioned an array with a number of subscripts and used it with another number of subscripts.
|473||Array bounds error|
For a static dimensioned array, your program referenced the array with a literal value that was out of the range.
The variable types in a SWAP statement are not the same.
The type or number of parameters does not correspond with the declaration of the function or procedure.
|476||CLEAR parameter error - use MEMSET/$STACK|
The additional parameters available to the CLEAR statement are not available in a BASIC compiler like Turbo Basic.
|477||LOCAL requires DEF FN/SUB|
You can only declare LOCAL variables in a function or procedure.
|478||SHARED requires DEF FN/SUB|
You can only declare SHARED variables in a function or procedure.
|479||STATIC requires DEF FN/SUB|
You can only declare STATIC variables in a function or procedure.
|480||COMMON arrays must be dynamic|
Arrays used in a COMMON statement must be declared DYNAMIC.
|481||LOCAL arrays must be dynamic|
Arrays defined as LOCAL cannot be defined as STATIC. Get rid of the STATIC specifier or move the array definition out of the procedure or function and into your main program.
|482||Parameter arrays cannot be altered|
You cannot ERASE and DIM an array used as a parameter in a function or subprocedure.
|483||Array is not STATIC|
A static array may not be DIMensioned using variables as the index descriptors. You must use either named constants or literal constants when specifying the indices of STATIC arrays.
|484||Array previously STATIC|
If you have two DIM statements in a program for the same array, the array is automatically declared as DYNAMIC. You then tried to declare the array STATIC in another place or your program tried to issue a DIM DYNAMIC to an array that was previously declared STATIC.
|485||Array name without "( )" expected|
When using the ERASE statement, you need not specify the parentheses with the array name.
|486||Array exceeds 64K|
The size of an array cannot exceed 64K (one data segment). If you need larger arrays, you can split up one array into several arrays.
|487||Arrays limited to eight dimensions|
The maximum number of dimensions that can be specified for an array is eight. This is an internal limit for the compiler.
|488||Invalid numeric format|
Your program declared a number with more than 36 digits or a floating-point number with an £ component without the exponent value.
|489||Invalid function/procedure name|
In the case of a function, FN must be followed by a letter and then other letters, digits, and periods, optionally ended with a type identifier (%, &, !, #, or $). In the case of a procedure, the name must begin with a letter and may be followed by other letters, digits, and periods, but may not include a type identifier.
|490||No parameters with INLINE SUB|
You did not specify a formal parameter list in an INLINE SUB procedure declaration. The assembly language program is responsible for knowing the number and type of parameters being passed to it. No type-checking is done by the compiler.
|491||Only $INLINE allowed here|
Only $INLINE statements are allowed in a SUB procedure declared with the INLINE option.
|492||$INLINE requires SUB INLINE|
$INLINE statements can only be used in a SUB procedure with the INLINE option.
|493||$INCLUDE file not found|
An include file could not be found in the specified directory path, current directory, or in the path specified by Setup's Directories option. Check the Directories path or make sure that the specified include file name exists.
|494||$INCLUDE disk error|
When Turbo Basic tried to open the include file, a disk error was reported during compilation.
|495||$INCLUDE file too large|
Include files, like all files that can be loaded by the Turbo Basic editor, must be no larger than 64K.
|496||$INLINE file not found|
An INLINE file could not be found in the specified directory path or current directory. Make sure that the specified include file name exists.
|497||$INLINE disk read error|
When Turbo Basic tried to open the INLINE file, a disk error was reported during compilation.
|498||Temporary file access error|
While compiling to disk (an .EXE or a .TBC file), the compiler was unable to access its temporary file. Check the Turbo directory in the Directories option of the Setup pull-down menu to make sure that the directory defined exists.
|499||Destination file write error|
While compiling to disk (an .EXE or a TBC file), the compiler received a disk write error.
|500||CLEAR not allowed here||600-|
If this error occurs, report it immediately to Borland's Technical Support Group.