Vector Basic Interpreter Basic 80 Reference Manual - page 61
When using IF to test equality for a value
that
is
the result of a floating point
computation,
remember that the internal representation.of the
value
may
not
be
exact.
Therefore, the test
should be
against
the
range
over
which
the
accuracy of the value may vary.
For example, to
test a computed variable
A
against
the
value
1.0,
use:
This test returns true if the value of A is
1.0
with a relative error of less than 1.0E-6.
Example 1:
200 IF I THEN GETtl,I
This statement GETs record number I if I is
not
zero.
Example 2:
100 IF(I<20)*(I>10) THEN OS-1979-1:GOTO 300
110 PRINT "OOT OF RANGE"
In this example,
a
test
determines
if
I
is
greater
than
10
and less than 20.
If I is in
this
range,
DB
is
calculated
and
execution
branches
to
line
300.
If
I
is not in this
range, execution continues with line 110.
This
statement
causes
printed
output
to
go
either
to
the
terminal
or
the line printer,
depending on the value of a
variable
(IOFLAG).
If
IOFLAG
is
zero, 'output
goes
to the line
printer, otherwise output goes to the terminal.