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.
Basic Data Types Summary
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Basic Data Types Summary
■ A data type refers to the variable attribute that determines the kind
of data a variable can hold. Supported data types include INTEGER, LONG,
SINGLE, DOUBLE, CURRENCY, and STRING. Special data types include FORM,
CONTROL, and user-defined.
■ Valid suffixes, sizes, and ranges for Basic data types are listed below.
Some values differ for ISAM specific types. See: ◄ISAM Data Types Summary►
■ Data type names accepted in AS type declarations are shown in uppercase
letters. See: ◄AS Declaration Statements►
Size
Keyword (Data Type) Suffix (Bytes) Range
═══════════════════ ══════ ════════ ═══════════════════════════════
INTEGER (integer) % 2 -32,768 to 32,767
LONG (long integer) & 4 -2,147,483,648 to 2,147,483,647
SINGLE (single- ! 4 Six digits of precision
precision floating-
point)
DOUBLE (double- # 8 Ten digits of precision
precision floating-
point)
CURRENCY (fixed- @ 8 -922337203685477.5808 to
point) 922337203685477.5807
STRING (variable- $ 4 + 1(1) 0 to 32,767 bytes
length)
STRING*n (fixed- $ 4 + n 0 to 32,767 bytes
length)
User-defined N/A As req'd Valid range for variable types
(record
variable)
FORM (form) N/A As req'd
CONTROL (control) N/A As req'd See: ◄Controls Summary►
◄IF TYPEOF Statement►
─────────────────────────────────────────────────────────────────────────
(1) 4 bytes per descriptor plus 1 byte per string character.
■ Use the LEN function can be used to return the size of a variable. The
FRE function can be used to approximate the memory size of a form or
control. See: ◄FRE Function► ◄LEN Function►
See: ◄DEFtype Statements► ◄Elementary Data Types (Numeric)►
◄Elementary Data Types (Strings)► ◄Scope Rules►
◄Type Conversion Rules► ◄Type-Declaration Suffixes►
◄User-Defined Data Types►