# Numbers

DataFlex can represent numerous different number types, all of which
are represented by the same tokens. See Fundamental
Types for a complete list of types.

Integer tokens are formed by
combining numeric digits, and an optional minus sign. These represent
whole numbers in the range –2147483647
to 2147483648. Numbers outside this range cannot be represented as an
integer token.

Since integers are whole numbers, they cannot contain decimal places.

Examples of integer tokens are:

2800

0

-1000000

These tokens are not integers:

-2800.01 // this number contains decimal places

12345678901234567890 // this number exceeds the maximum range

Number tokens are formed by
combining numeric digits, a decimal point, and an optional minus sign.
These represent real numbers
in the range +/–99999999999999.99999999.

Examples of number tokens are:

1000.55

-0.0000004

Real number
tokens are used to represent numbers in a floating-point format.

A real number is formed by combining mantissa
and exponent parts using the
special symbol e (scientific
notation) to delimit the exponent. The format of each of the mantissa
and exponent parts is the same as a DataFlex Number token (but the range
for each is smaller). The exponent is written after the mantissa without
any intervening separators.

Examples of real tokens are:

1.55e003 // 1.55 x 10 to the power of 3, or 1,550

-2.0e-002 // -2 x 10 to the power of –2 or -2/100

DataFlex can represent real numbers
in the range +/-1.0 times 10 to the power of +/-306. Real numbers are
accurate to a precision of 15 significant digits, (i.e., the mantissa
can be expressed as a number up to 15 digits following the decimal point).

### Hexadecimal Tokens

Hexadecimal tokens are used
to denote integer-type numbers in hexadecimal format. A hex number is
formed by writing a dollar symbol ($) followed by 1 to 8 hexadecimal digits.
Hex numbers must be within the range from $00000000 to $FFFFFFFF.

Examples of hex tokens are:

$1F

$B200A1