English
Language : 

NSB8 Datasheet, PDF (82/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
grifo®
ITALIAN TECHNOLOGY
USING NUMBERS
This section describes numbers and how to use them in conjunction with the standard version of
NSB8. Those with non standard version of BASIC should read the section called NON STANDARD
VERSIONS OF BASIC which provides extra information applicable to their individual situations.
CONSTANTS
Numbers are represented within BASIC programs much as they are written in everyday usage. Here
are some numbers as they might be written in a typical BASIC program:
0 347 -33.333 .00176 1.003
.1 -8 123.4567 -.3 0.2
Numbers such as these are called numeric constants.
Constants may also be written in scientific notation (also called exponential format or E format). This
is a way to represent very small or very large numbers without having to deal with leading or trailing
zeroes which can make a number seem unconfortably long. Here are the same numbers as in the
examples above, but written in scientific notation:
0E+00
1E-01
3.47E+02 -3.3333E+01 1.76E-03 1.003E+00
8E+00 1.234567E+02 -3E-01 2E-01
A number in scientific notation has a mantissa part and an exponent part. These are separated by the
letter E, which may be read as “times 10 to the power of”. Thus, 1.76E-03 would be read as “1.76
times 10 to the power of -3”
VARIABLES
In BASIC, as in most other programming languages, a numeric variable is considered to be a place
(in computer memory) where a numeric value may be held. It is, in effect, a storage place which may
be occupied by any one numeric value at any time. If a new number is put in a variable, that number
totally replaces the previous value which the variable held.
All numeric variables are given initial values of zero until given different values in explicit LET
statements.
Variables are given names, and a variable name is used to refer to the variable and/or its contents
when writing programs.
Numeric variable names in NSB8 consists of a single capital letter, or a single capital letter followed
by a single digit from 0 to 9. Here are some legal NSB8 variable names:
A B7 C3 Z Q N8 P0
Because these variables may contain only one value, they are called simple variables.
Page 70
NSB8
Rel. 5.10