Errors

Sometimes MiniBasic will terminate with an error message. Usually these are due to typing mistakes or logic errors in the bASIC program. Occasionally they may be caused by the computer running out of resources, by illegal input, or by internal errors in the MiniBasic interpreter.

Can’t read program

You have called MiniBasic with something it cannot recognise as a MiniBasic program at all, for instance with a text file containing a nursery rhyme.

Program lines not in order

Lines have to be in numerical order. If lines are out of order, you will receive this error.

Line not found

You have tried to jump to a non-existent line.

Syntax error line

This means that the computer has encountered a line it cannot understand. It is a catch all error, incorporating things such as identifiers starting with digits, or lines not terminated with a newline.

Out of memory

The computer has run out of memory. This may occur when you try to dimension a huge array, or it may occur at any time if the computer is low on resources, since MiniBasic uses memory internally. Be particularly careful when dimensioning arrays with variables.

Identifier too long

An identifier (variable name) is allowed to be only 31 characters long, including the $ for a string identifier. For dimensioned variables the number is one less.

No such variable

You have attempted to use a variable that has not been initialised.

Bad subscript

You have tried to access a dimensioned array beyond its dimensioned size.

Too many dimensions

You have tried to dimension an array with more than five dimensions.

Too many initialisers

In initialising a dimensioned array, you have tried to list more values than you have space for.

Illegal type

You have tried to use a string variable as the counter for a for loop

Too many nested fors line

Maximum depth of FOR .. NEXT loops is 32. Exceeding this limit is probably due to problems with jumping out of FOR ... NEXT loops.

For without matching next

You have declared a FOR statement but not a matching NEXT

Next without matching for

You have declared a NEXT statement without a matching FOR

Divide by zero

You have attempted to divide by zero. This is a mathematical error

Negative logarithm

You have attempted to take the logarithm of zero or a negative number. This is a mathematical error.

Negative square root

You have tried to take the square root of a negative number. This is a mathematical error

Sine or Cosine out of range

You have attempted to pass a value not in the range –1.0 to 1.0 to the ASIN() or ACOS() functions.

End of input file

An INPUT statement has encountered an end of file condition. This could be due to some problem with the computer’s system.

Illegal offset

A string function has received an illegal value for a string offset, such as a negative second argument to LEFT$()

Type mismatch

You have entered a string expression where MiniBasic was expecting a numeric expression, or a numeric expression where it was expecting a string.

Input too long

Input lines can be a maximum of 1023 characters long. Lines longer than this are almost certainly either errors or malicious attempts to exploit the system, so they are rejected.

Bad value

There has been an internal overflow. Usually this is caused by trying to calculate with ridiculously large value like 10 trillion.

Not an integer

A non-integer was used as an array index or to a function ( like RND() ) which naturally expects an integer. Note that floating point arithmetic is not exact so expressions like SQRT(3.0) * SQRT(3.0) may not return exactly 3.0. Use the INT() function to force a number to an exact integer.

ERROR

Unspecified error has occurred. This probably represents some internal problem.