Basic
Octal
numbers represent a numeric system to the base of
8.
They
can be
1
to
6
digits and are preceded by
&O
or
&.
The octal
numbers are: 0,
1,
2, 3, 4, 5,
6,
7. For example: &07, &0123,
&00055,
&66.
Numbering Systems
This chart shows the relationship of decimal, hexadecimal and octal
numbers. The relationship of binary (base
2)
numbers is also shown.
This information is useful in graphic modes.
Decimal Hexadecimal Octal Binary
0 0 0 0000
1 1
1
0001
2
2
2
0010
3
3
3 001
1
4 4
4 01 00
5 5
5
0101
6 6
6 0110
7 7
7
0111
8 8
10 1000
9 9
11
1001
10
A
12
1010
11
B
13 1011
12
C
14 1100
13
D
15
I101
14
E
16 1110
15
F
17
1111
Numeric Constants
Numeric constants are values input to a program that are not subject
to change. They can be in any
of
the 5 forms previously described.
Notice that numeric constants:
cannot contain punctuation. For example 100,000 is not
acceptable but 100000 is acceptable.
are evaluated when entered.
If
they are out
of
range for their
type, an error message is immediately returned.
are of several types.
Type
can be indicated by the use of sym-
bols following the number. The symbols are:
!
declares a single precision number. For example,
12.345678901234! is stored by BASIC as 12.34568.
10
Tandy
1000