qb45advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DEFtype Declaration Statements
◄Declaring Simple Variables► ◄DEFtype Declarations► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
DEFtype Declaration Statements
Use the BASIC statements DEFINT, DEFLNG, DEFSTR, DEFSNG, and DEFDBL to
declare the types for certain variable names. By using one of these DEFtype
statements, you can specify that all variables starting with a given letter
or range of letters are one of the elementary variable types, without using
the trailing declaration character.
DEFtype statements only affect variable names in the module in which they
appear. Remember a DEFtype statement affects all variables starting with
the given letter or range of letters.
AS Type Variable Size
Suffix Name DEFtype Type of Data
------ ------ ------- -------- -------
% INTEGER DEFINT Integer 2 bytes
& LONG DEFLNG Long integer 4 bytes
! SINGLE DEFSNG Single precision 4 bytes
# DOUBLE DEFDBL Double precision 8 bytes
$ STRING DEFSTR Variable-length Takes 4 bytes
string for descriptor,
1 byte for each
character in
string.
$ STRING*num Fixed-length Takes num bytes.
string
Declared Takes as many
user-defined bytes as the
type individual
elements
require.