English
Language : 

NSB8 Datasheet, PDF (84/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
grifo®
ITALIAN TECHNOLOGY
1.23456789E-09, with a 9 digit mantissa which is too many digits. The number will be rounded to
1.2345679E-09 (note that scientific notation is a more compact way to write these very small
numbers). Finally, if you added 1 to either number, it would be rounded to become exactly 1. Check
the E format versions for the clear reason. This time, you’ll come up with 1.00000000123E+00 and
1.0000000012345679E+00. Both mantissas exceed 8 digits in length. Rounding them to 8 digits
leaves only the number 1 for each.
RANGE
A number may be positive, negative, or zero. Positive and negative numbers in standard (8 digits)
precision NSB8 can range in magnitude from 1E-64 to 9.9999999E+62.
If you type a numeric constant into BASIC which is too large for BASIC to handle, a SYNTAX ERROR
will occur. If a number which is too small is typed in, it will be rounded down to zero.
OPERATORS
Operators are used in BASIC as they are in regular arithmetic to combine two numeric values
(operands) or to modify one operand in certain predefined ways. Three classes of operators,
arithmetic, relational, and boolean are used with numbers. Each class will be examined separately:
ARITHMETIC OPERATORS
These operators correspond to those used in common mathematic expressions:
OPERATOR
^
*
/
-
+
-
FUNCTION
exponentiation
multiplication
division
subtraction
addition
negation
EXAMPLE
9^2=81
5*1.5=7.5
3/2=1.5
3.2-2=1.2
7.9+2.1=10
-3, -27
RELATIONAL OPERATORS
The relational operators are used to compare pairs of numeric values. The numeric result of a
relational comparison is either 1 (which stands for true) or 0 (false). Usually, relational comparisons
are employed as conditions for IF…THEN statements (see statement IF). For example, at a certain
point in a program, it might be desired to assign the value of 10 to the variable T if the value of X
is greater then 10. The comparison (X>10) would be used as
IF X>10 THEN T=10
The IF statement will assign 10 to T based on the truth or falsehood of the relational comparison at
the time the statement is executed. The following chart presents the relational operators available in
NSB8:
Page 72
NSB8
Rel. 5.10