IPAddr

GW-Basic Error Codes

Error
Code
Error
Message
1NEXT without FOR
This can also be caused by other mismatched code (eg IF/ENDIF, WHILE/LOOP etc)
2Syntax Error
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.
3RETURN without GOSUB
A RETURN was encountered without a matching GOSUB; that is, there is nothing to RETURN from.
4Out of DATA
A READ statement ran out of DATA statement values.
5Illegal 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:
  • Too large a color or screen mode argument
  • Issuing a graphics statement without a graphics adaptor or setting the proper mode with the SCREEN statement
  • Trying to perform invalid mathematical operations, such as taking the square root of a negative number.
  • Too large (or negative) a record number in a GET or PUT.
  • Attempting to use the WIDTH statement on a sequential file.
  • Using INSTR, MID$, LEFT$, RIGHT$ on an empty string may also cause this error
6Overflow
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.
7Out of memory
Many different situations can cause this message, including dimensioning too large an array.
8Label not defined
9Subscript 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.
10Duplicate definition
You attempted to dynamically dimension an array for the second time, without first erasing it.
11Division by zero
You attempted to divide by zero or to raise zero to a negative power.
12Illegal in direct mode
13Type mismatch
You used a string value where a numeric value was expected or vice versa. This can occur in PRINT USING, DRAW, or PLAY statements.
14Out of string space
String storage space is exhausted; string memory is limited to 64K.
15String Too Long
The string produced by a string expression is longer than 32,767 bytes.
16String formula too complex
17Cannot continue
18Function not defined
19No RESUME
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.
20RESUME without error
You executed a RESUME statement without an error occurring; that is, there is no error-handling subroutine to RESUME from.
24Device timeout
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.)
25Device Fault
A hardware error has occurred; for example, with the printer interface or a communications adaptor.
26FOR without NEXT
27Out of paper
The printer interface indicates that the printer is out of paper. It may simply be turned off or have some other problem.
29WHILE without WEND
30WEND without WHILE
33Duplicate label
35Subprogram not defined
37Argument-count mismatch
38Array not defined
39CASE ELSE expected
40Variable required
50FIELD overflow
Given the file's record length, you attempted to define too long a set of field variables in a FIELD statement.
51Internal error
A malfunction occurred within the Turbo Basic run-time system. Call Borland's Technical Support Group with information about your program.
52Bad 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.
53File not found
The file name specified could not be found on the indicated drive.
54Bad file mode
You attempted a PUT or a GET (or PUT$ or GET$) on a sequential file.
55File already open
You attempted to open a file that was already open or you tried to delete an open file.
56FIELD statement active
57Device I/O error
A serious hardware problem occurred when trying to carry out some command.
58File already exists
The new name argument specified by the NAME command already exists.
59Bad record length
61Disk full
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.
62Input 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.
63Bad 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.
64Bad file name
The file name specified in a FILES, KILL, or NAME statement contains invalid characters.
67Too 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.
68Device unavailable
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.
69Communication-buffer overflow
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.
70Permission denied
You tried to write to a write-protected disk.
71Disk not ready
The door of a floppy disk drive is open or there is no disk in the indicated drive.
72Disk-media error
The controller board of a floppy or hard disk indicates a hard media error in one or more sectors.
73Advanced feature unavailable
74Rename 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.
75Path/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.
76Path not found
The path you specified during a CHDIR, MKDIR, OPEN, and so forth, can't be found.
PDS adds these
80Feature Removed
81Invalid Name
82Table Not Found
83Index Not Found
84Invalid Column
85No Current Record
86Duplicate Value For Unique Index
87Invalid Operation On Null Index
88Database Needs Repair
89Insufficient Isam Buffers
Borland Turbo-Basic DOS adds these
201Out of stack space
Too many nested gosubs may cause this
202Out 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.
203Mismatched 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.
204Mismatched 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).
205Mismatched program revisions
You attempted to CHAIN between two program segments that were created with different versions of the Turbo Basic compiler.
206Invalid program file
You attempted to CHAIN or RUN a program segment that was not compiled with Turbo Basic.
242String/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.
243CHAIN/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.
258Program too big to fit into memory
Hmm - you're gonna have to break the program down into smaller segments.
VISBASIC DOS adds these
384Property Can't Be Modified When Form Is Minimised Or Maximised
385Must Specify Index When Using Property Array
386Property Not Available At Run Time
387Property Can't Be Set On This Control
400Form Already Displayed; Can't Show Form Modally
401Can't Show Non-Modal Form When A Modal Form Is Being Displayed
402Must Close Or Hide Topmost Modal Form First
403Mdi Form Cannot Be Shown Modally
410Property Can't Be Modified On Mdi Form
420Invalid Object Reference
421Method Not Applicable For This Object
422Property Not Found
423Property Or Control Not Found
424Object Required
425Invalid Object Use
430No Currently Active Control
431No Currently Active Form
480Can't Create Autoredraw Image
Borland Turbo-Basic Compiler Errors
401Expression too complex
The expression contained too many operators/operands; break it down into two or more simplified expressions.
402Statement 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.
405Block nesting overflow
Your program has too many statement block structures nested within each other. Turbo Basic block structures may be nested 255 levels deep.
406Compiler 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.
407Program too large
Your program contains more than 65,530 statements.
408Segment 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.
409Variables 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.
410"," expected
The statement's syntax requires a comma (,).
411"'* expected
The statement's syntax requires a semicolon (;).
412"(" expected
The statement's syntax requires a right parenthesis (( ).
413")" expected
The statement's syntax requires a left parenthesis ( )).
414" = " expected
The statement's syntax requires an equal sign ( = ).
415"-" expected
The statement's syntax requires a hyphen (-).
416Statement expected
A Turbo Basic statement was expected. Some character could not be identified as a command, a metacommand, or a variable.
417Label/line number expected
A valid label or line number reference was expected in an IF, GOTO, GOSUB, or ON statement.
418Numeric expression requires relational operator
The compiler has found a string operand in a position where a numeric operator should be.
419String expression requires string operand
The compiler expected a string expression and found something else; for example: X$ = A$ + B
420Scalar 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.
421Array variable expected
An array variable was expected in a DIM statement or in the graphics GET and PUT statements.
422Numeric variable expected
A numeric variable was expected in an INCR, DECR, or CALL ABSOLUTE offset specification.
423String variable expected
A string variable was expected in a FIELD, GET$, PUT$ or LINE INPUT statement.
424Variable expected
A variable was expected in a VARPTR, VARPTR$, or VARSEG function.
425Integer constant expected
An integer constant was expected in a named constant assignment or a conditional compilation $IF/$ELSEIF.
426Positive 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.
427String constant expected
A string constant was expected for the file name in an $INCLUDE metastatement.
428Numeric scalar variable expected
Either an integer, long integer, or single- or double-precision real variable is expected; for example, in a FOR/NEXT loop.
429Integer scalar variable expected
An integer variable was expected as a parameter in a CALL ABSOLUTE statement.
430Integer array variable expected
An integer array variable was expected; for example, in a PALETTE statement.
431End of line expected
No characters are allowed on a line (except for a comment) following a metastatement, END SUB, or a statement label.
432AS expected
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.
433DEF 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.
434IF expected
The compiler found an END IF or an EXIT IF statement without a beginning IF statement defined.
435DO LOOP expected
The compiler found a LOOP or EXIT LOOP statement without a beginning DO statement defined.
436SELECT expected
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.
437CASE expected
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.
438FOR LOOP expected
The compiler found an EXIT FOR statement without a beginning FOR statement defined.
439SUB expected
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.
440END DEF expected
A function wasn't terminated by a corresponding END DEF statement.
441END IF expected
An IF block wasn't terminated by a corresponding END IF statement.
442LOOP/WEND expected
A DO or WHILE loop was not terminated with a corresponding LOOP or WEND statement.
443END SELECT expected
A SELECT CASE statement was not properly terminated with an END SELECT statement.
444END SUB expected
A procedure was not properly terminated with an END SUB statement.
445NEXT expected
A FOR loop was not properly terminated with a NEXT statement.
446THEN expected
An IF statement is missing its accompanying THEN part.
447TO expected
A FOR statement is missing its accompanying TO part.
448GOSUB expected
An ON statement is missing its accompanying GOSUB part.
449GOTO expected
An ON statement is missing its accompanying GOTO part.
450$ENDIF expected
An $IF conditional compilation metastatement is missing its accompanying $ENDIF. Look for all $IF metastatements and find out where to put the associated $ENDIF
451Unmatched $ELSE
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.
452Unmatched $ENDIF
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.
453Undefined 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.
454Undefined 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.
455Undefined 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.
456Undefined 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.
457Undefined 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.
458Duplicate 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.
459Duplicate 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.
460Duplicate 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.
461Duplicate 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.
462Duplicate 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.
463Duplicate 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.
464Duplicate $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.
465Duplicate $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.
466Duplicate $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.
467Invalid line number
Line numbers must be in the range to 65535.
469Metastatements not allowed here
Metastatements must be the first statement on the line.
470Block/Scanned statements not allowed here
Block statements like WHILE/WEND, DO/LOOP, and SELECT CASE are not allowed in single line IF statements.
471Unknown identifier/ syntax error
Something is incorrect on the line the compiler could not determine a proper error message.
472Array subscript error
You dimensioned an array with a number of subscripts and used it with another number of subscripts.
473Array bounds error
For a static dimensioned array, your program referenced the array with a literal value that was out of the range.
474Type mismatch
The variable types in a SWAP statement are not the same.
475Parameter mismatch
The type or number of parameters does not correspond with the declaration of the function or procedure.
476CLEAR parameter error - use MEMSET/$STACK
The additional parameters available to the CLEAR statement are not available in a BASIC compiler like Turbo Basic.
477LOCAL requires DEF FN/SUB
You can only declare LOCAL variables in a function or procedure.
478SHARED requires DEF FN/SUB
You can only declare SHARED variables in a function or procedure.
479STATIC requires DEF FN/SUB
You can only declare STATIC variables in a function or procedure.
480COMMON arrays must be dynamic
Arrays used in a COMMON statement must be declared DYNAMIC.
481LOCAL 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.
482Parameter arrays cannot be altered
You cannot ERASE and DIM an array used as a parameter in a function or subprocedure.
483Array 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.
484Array 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.
485Array name without "( )" expected
When using the ERASE statement, you need not specify the parentheses with the array name.
486Array 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.
487Arrays 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.
488Invalid numeric format
Your program declared a number with more than 36 digits or a floating-point number with an component without the exponent value.
489Invalid 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.
490No 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.
491Only $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.
498Temporary 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.
499Destination file write error
While compiling to disk (an .EXE or a TBC file), the compiler received a disk write error.
500CLEAR not allowed here
600-
610
Internal Error
If this error occurs, report it immediately to Borland's Technical Support Group.