VARIABLES IN BASIC There are three types of variables in BASIC. 1. Integer variables 2. Real number variables 3. String variables A BASIC variable must consist of one or two characters followed by an optional variable type designator. The first character must be a letter (A-Z) and the second character (if present) must be numeric(0-9). REAL NUMBERS If no variable type designator is present, the variable is a REAL NUMBER and occupies two 16 bit words of storage in memory. EXAMPLE A, A1,C8 ~ INTEGER VARIABLE An integer variable is designated by following the two character variable name with a percent sign ( % ). An integer variable can have any value from -32000 to 32000, and occupies only one word of computer memory. 16 bit words of storage in memory. EXAMPLE A%, A1%,C8% NOTE**** A and A% are different variables as far as BASIC is concerned and both can be in the same program. ~ STRING VARIABLES A string variable is designated by placing a dollar sign ( $ ) after the two character(s) of the variable name. A string variable occupies 8 bits of computer memory for each ASCII character stored in it. EXAMPLE A$,A1$,C8$ For further help with string variables and string functions type HELP BASIC VARIABLE STRING ~ DIMENSIONED VARIABLES A BASIC variable may optionally have one or two dimensions. BASIC treats a dimensioned variable as a different variable than a undimensioned variable of the same name. A variable is dimensioned with the DIMENSION statement. DIM variablename(dim1 [,dim2]) Again the variable name may include the optional variable type designators ( % and $ ). In the immediate mode BASIC does not allow a variables dimension to exceed 10. 3 STRING @LB:[1,2]BASSTRING.HLP