IBM 5100 Basic Reference Manual page 106

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

102
During output, specified expressions are displayed or printed beginning where the
previous PRINT or PRINT USING statement ended in a line. If this is the first
PRINT or PRINT USING statement, output begins on a new line. If the PRINT
USING statement contains expressions that exceed format specifications in the
specified image statement, output is controlled by the delimiter following the
expressions. If the delimiter is a comma, the current line is displayed or printed,
and the remaining expressions are formatted according to the beginning of the
image statement, and output begins on a new line. If the delimiter is a semicolon,
expressions remaining after the end of :the image statement are formatted according
to the beginning of the image statement, and output cQntinues on the same line.
This allows the printing of lines longer than 64 characters.
The delimiter following the last expression value controls printing at the end of
expressions. If the delimiter is a comma or blank, the current line is displayed or
printed and the next output will start on a new line. If the delimiter is a semicolon,
the current line is not displayed or printed and the next output will be added to
the current line.
If the end of the image statement is reached after the last expression value or the
first unused format specification is found, formatting is stopped.
Notes About PRINT USING
• The number of image statements permitted in a BASIC program is only limited
by available storage.
If the PRINT USING statement output list contains at least one item, there must
be at least one format specification in the corresponding image statement.
• If there is no printer attached to the 5100, executing the PRINT USING FLP
statement stops the program, unless the P
=
D (printer
=
display) option was
specified in the RUN command.
• Image statements are nonexecutable and can be placed anywhere in a BASIC
program, either before or after the PRINT USING statements that refer to them.
Example
The following example shows execution of a PRINT USING statement where
A
=
342 and B
=
42.02
100 :RATE OF LOSS
####
EQUALS
####.##
POUNDS
110 PRINT USING 100, A, B
The output is:
RATE OF LOSS 342 EQUALS 42.02 POUNDS
f
I
"
, ./

Advertisement

Table of Contents
loading

Table of Contents