Quick start manual
Memory management
11-5
Internal data formats
The Double type
An 8-byte (64-bit) Double number is divided into three fields:
The value v of the number is given by
if 0 < e < 2047, then v = (–1)
s
* 2
(e–1023)
* (1.f)
if e = 0 and f <> 0, then v = (–1)
s
* 2
(–1022)
* (0.f)
if e = 0 and f = 0, then v = (–1)
s
* 0
if e = 2047 and f = 0, then v = (–1)
s
* Inf
if e = 2047 and f <> 0, then v is a NaN
The Extended type
A 10-byte (80-bit) Extended number is divided into four fields:
The value v of the number is given by
if 0 <= e < 32767, then v = (–1)
s
* 2
(e–16383)
* (i.f)
if e = 32767 and f = 0, then v = (–1)
s
* Inf
if e = 32767 and f <> 0, then v is a NaN
The Comp type
An 8-byte (64-bit) Comp number is stored as a signed 64-bit integer.
The Currency type
An 8-byte (64-bit) Currency number is stored as a scaled and signed 64-bit integer
with the four least-significant digits implicitly representing four decimal places.
Pointer types
A Pointer type is stored in 4 bytes as a 32-bit address. The pointer value nil is stored
as zero.
Short string types
A string occupies as many bytes as its maximum length plus one. The first byte
contains the current dynamic length of the string, and the following bytes contain the
characters of the string.
The length byte and the characters are considered unsigned values. Maximum string
length is 255 characters plus a length byte (string[255]).
111 52
se f
1151 63
sei f