DEFINT/SNG/DBL/STR
Statements
Declare the variable type in accordance with
the letter(s) specified. These statements are
usually used in
a
program.
Syntax
type
letter
Remarks
Example
7-76
DEF type letter[-letter][,letter[-letterll ...
is INT, SNG, DBL, or STR. No space should be entered
between DEF and INT, SNG, DBL, or STR.
represents a letter from the alphabet (A-Z)
Any variable names beginning with the
letter(s) specified in "range of letters" will be
considered. The type of variable specified by
the "type" declaration character
(%,! ,#,$)
always takes precedence over a DEFtype
statement.
If no type declaration statements are
encountered, GWBASIC assumes all variables
without declaration characters are single
precision variables. DEFtype statements must
precede the use of the defined variables.
10 DEFDBL L-P
All variables beginning with the letters L, M,
N, 0, and P will be double precision variables.
10 DEFSTR A
All variables beginning with the letter A will
be string variables.
10 DEFINT I-N,W-Z
All variables beginning with the letters I, J, K,
L, M, N, W, X, Y, Z will be integer variables.