Arithmetic Data - IBM 5110 Basic Reference Manual

Hide thumbs Also See for 5110:
Table of Contents

Advertisement

C)
I
I
~-,J
o
Underscore
The underscore character (uppercase F) is a valid overstrike character in the
system.
Additional underscore capability is provided through a special keyboard
operation. When you hold down the CMD key and press the spacebar, a
symbol (.) will be displayed on the screen. This character can also be created
if you use the hexadecimal constant FF.
Note: Do not use the •
character in a data statement or in a comment. The
character can only be displayed; it cannot be printed. When entered in a
line of data to be printed, this character causes all characters to its right to be
underscored until another •
character is encountered. When the data is
printed, a blank will appear in place of the •
characters. Spaces between
characters are not underscored. An example of this function is shown below.
If you enter THE MANUAL IS THE • BASIC INTRODUCTION.,
SA21-9306'; this is printed:
THE
j"/j
(~Ij""·.!
1...1
(·11...
I
~:)
THE
f~ C·! i.:.~
.I
! . .
~.~
. 1 .
t:~
J
r:~
!J
I!
!.)
r.:~
:r
.J.
L!
t1
ARITHMETIC DATA
Arithmetic data is data with a numeric value. All numbers in BASIC are
expressed to the base 10; that is, they are treated as decimal numbers.
Magnitude
The magnitude of a number is its absolute value. The range of numbers
permitted in BASIC programs is greater than or equal to 1 E-78 and less than
1
E+74.
Precision
In BASIC, the precision of a number is the maximum number of digits it can
contain. You can use the RUN command to select long or short precision.
When you enter RUN (long precision)' each numeric data item will have
15-digit precision, occupying 8 character positions of storage. When you enter
RUNS (short precision)' each numeric data item will have 7-digit precision,
occupying 4 character positions of storage. All numbers in BASIC are
converted to internal binary floating point format for processing. Because a
decimal fraction may not have an exact binary equivalent, some truncation
errors may occur after the conversion.
Data Constants, Variables, And Concepts
55

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents