To declare variable types as integer, single-precision, double-precision, or string.
typeis INT (integer), SNG (single-precision number), DBL (double-precision number), or STR (string of 0-255 characters).
lettersare letters (separated by commas) or range of letters of the alphabet.
A DEFtype statement declares that variable names beginning with the letter(s) specify that type of variable. However, a type declaration character (%,!,#,$) always takes precedence over a DEFtype statement in the typing of a variable.
If no type declaration statements are encountered, BASIC assumes all variables are single-precision. Single-precision is the default value.
10 DEFDBL L-P
All variables beginning with the letters L, M, N, O, and P will be double-precision variables.
10 DEFSTR A
All variables beginning with the letter A will be string variables. The $ declaration is unnecessary in this example.
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. W$ in Line 20 establishes a string variable beginning with the letter W. However, the variable W will remain an integer elsewhere in the program.
All Frank Sinatra recordings, All Beatles albums, All solo albums from John Lennon, Paul McCartney, George Harrison and Ringo Starr, All Beatles songs, List of Platinum selling albums, Database with hits from 1950 to 1999.
Sought after DLL files, Nutworks magazine (retro), Worldwide ISO and TLD codes, File extensions database, The Hackers dictionary, Free software for the Atari, Amiga and Macintosh, Nokia smartphone, PocketPC, List of all BASIC programming language commands, List of all DOS commands, Free Advanced Bash-Scripting Guide (Linux-Unix)