HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4-: 109
Examples
Below are several examples of the PRINT statement.
200 PRINT
210 PRINT,
220 PRINT;
230 PRINT X,X+Y;A$,LWC$(A$+B$);P(*),Q$(*);PAGE,TAB(10+X);
240 PRINT Z(*), (FOR I=1 TO 10, Z(I); 2*Z(I); I*Z(I)), D$
250 PRINT X,B$,C(*),D$(*),
260 PRINT A,,B
270 PRINT "THE ANSWER IS: "; Final_total
The PRINT statement evaluates the expressions in the display list from
left to right, and displays their values on the appropriate output
device. It displays numeric values in the current numeric output format
(see "Numeric Format Statements").
A PRINT statement without a display list prints a carriage return and a
line feed (a CRLF) on the output file or device.
The following examples show the PRINT statement used with data files.
100 PRINT #1; A,B,C
110 PRINT #2,5; D$,E
120 PRINT #3,7,4; F(),G$(*,*)
130 PRINT #4; N,M,(FOR I=1 TO 5, A(I,I), B$(I,I))
The PRINT statement writes BASIC DATA, binary, and ASCII files
differently; see Table 4-12.