English
Language : 

NSB8 Datasheet, PDF (99/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
DEFAULT FORMAT AND CURRENT FORMAT
BASIC keeps track of two format specifications: the current format and the default format. Each
numeric value in a PRINT output list is printed using the current format. At the beginning of each
PRINT statement, the value of the current format is made equivalent to that of the default format.
There after, the current format is changed each time a format specification occurs in the PRINT
output list. The default format is set initially to free format, and may be changed by using the cross
hatch (#) format character in a format specification as described below.
OTHER FORMAT CHARACTERS
Certain other format characters may be used to modify the effects of a format specification. Several
of these characters may be combined in one format specification, if you wish. All format characters
in a format specification must come after the % and before the format specification itself. Here are
the characters:
Z Trailing zeroes the decimal point are suppressed; spaces will be printed instead.
# The format specification after this character will become the default format. Also,
number to string conversion is done using the default format (see section FUNCTIONS,
in detail the built in STR$).
Note that %# will force free format to be the default format. This is useful in cases where
you have made another format the default, and would like to return to free format.
C Commas will be placed to the left of the decimal point as needed to group each sequence
of three digits, e.g. 1,234,567. (Note that the “C” option is not effective with E format
specifications.)
$ A dollar sign will be placed to the left of the value when it is printed.
Caution!
When using C or $ with a format specification, you must be sure that the field width specifies enough
character positions to contain the longest number you intend to PRINT in that format, plus any dollar
sign, plus any maximum amount of commas which may be inserted by the machine. For instance,
the statement:
PRINT %$C9F2, D
will yeld the output
$3,478.92
When D=3478.92, but will result in a FORMAT ERROR if D=107843. The number should be
printed as $107,843.00, but this requires the field width to be at least 11.
NSB8
Rel. 5.10
Page 87