English
Language : 

NSB8 Datasheet, PDF (60/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
PRINT
grifo®
ITALIAN TECHNOLOGY
STATEMENT:
PRINT
PRINT <list of string and/or numeric expression>
PRINT #<device expression>
PRINT #<device expression>,<list of string and/or numeric expression>
ACTION:
The data indicated in theoutput data list is printed on the specified output device. After the entire list
is printed, the print head or cursor of the terminal is moved to the start of the next line. If there is no
output list, only a blank line is printed. If no device is specified, output is printed on device #0, the
console terminal. The device expression consists of a numeric expression which evaluates to an
integer from 0 to 7, corresponding to a connected output device. A piece of data information in the
output list consists of any string or numeric expression. PRINT formatting expressions may also be
included in the output list. See Section FORMATTED PRINTING for complete details. Elements
in the output data list must be separated by commas. Elements in the same list will be printed on the
same output line. Information which cannot fit on one output line will be continued on the next.
If a comma follows the output list, the print head or cursor will not be moved to the next line, so
subsequent output will appear on the same line.
EXAMPLES:
PRINT
PRINT “THE ANSWER IS: “,
PRINT A,B,C,A7
PRINT #D
PRINT #Q,A,B,“HELLO”,C(3),Q$
Here is a sample program, designed to demonstrate the action of the PRINT statement as described
above. Try it:
10 A=3
20 B=4
30 PRINT “A EQUALS”,A,
40 PRINT “ B EQUALS”,B
50 END
When this program is RUN, the following should appear on your terminal:
A EQUALS 3 B EQUALS 4
REMARKS:
The exclamation point (!) may be used as an abbreviation for the keyboard PRINT. Thus, the
statement PRINT “STRING”is the same as !”STRING”. This is especially convenient when using
the PRINT statement in direct mode.
Note that the comma (as separator in the PRINT output list) performs the same function as the semi
colon in many other versions of BASIC. To obtain output tabbing, use the TAB function, as described
in section FUNCTIONS (in details built-in TAB).
Page 48
NSB8
Rel. 5.10