HTBasic Help
×
Menu
Index

CONFIGURE DIM

Turns implicit variable dimensioning on or off.
 
 CONFIGURE DIM { ON | OFF }
 
Usage:
CONFIGURE DIM ON
CONFIGURE DIM OFF
 
Example:      CONFIGURE DIM.BAS
 
Description:
CONFIGURE DIM turns implicit variable and string dimensioning on or off. By default it is on. If not declared, a numeric variable is assumed to be REAL; arrays will have the number of subscripts found in its first occurrence with each dimension having the default OPTION BASE as lower bound and an upper bound of ten; and a string is set with a maximum length of 18.
 
With CONFIGURE DIM OFF, each variable, string, and array must be explicitly declared using REAL, INTEGER, LONG, COMPLEX, and DIM statements or they will generate an error message that is written to the message line. (To see all these error messages turn PRINTALL IS on during prerun. If a program has already been prerun, CONFIGURE DIM OFF will not report any undeclared variables until another prerun occurs. To force a prerun to occur, change a program line and press the STEP key).
 
Without explicit mode you might have:
 
Xyz=1
PRINT Xy
 
Since Xyz and Xy are used without declaration, "Xy" could be a typo error that should have been "Xyz." This type of program error is extremely difficult to find in a large program. With CONFIGURE DIM OFF, the above program would throw an error without an explicit declaration:
 
REAL Xyz
 
See Also: