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

4-: 113
controlling the detailed output with PRINT DETAIL IF is more automatic
and centralized in one place:
Suppressed by program:
100 REPORT HEADER
...
200 END REPORT DESCRIPTION
...
500 IF Pdi THEN
510 DETAIL LINE 0 WITH N LINES USING A;X,Y
515 ELSE
520 DETAIL LINE 1 WITH N LINES USING A;X,Y
530 ENDIF
Suppressed by Report Writer:
100 REPORT HEADER
110 PRINT DETAIL IF Pdi
...
200 END REPORT DESCRIPTION
...
500 DETAIL LINE 1 WITH N LINES USING A;X,Y
PRINT USING
The PRINT USING statement dictates the format of the values that it
prints, by specifying either a format string or an IMAGE statement. The
DISP USING statement is similar to the PRINT USING statement, and Table
4-13 compares them.
Table 4-13. DISP USING compared to PRINT USING
---------------------------------------------------------------------------------------------
| | |
| Statement | Prints output to |
| | |
---------------------------------------------------------------------------------------------
| | |
| DISP USING | Standard list device. |
| | |
---------------------------------------------------------------------------------------------
| | |
| PRINT USING | The device specified by the most recently executed SEND OUTPUT TO |
| | statement. If that device is the standard list device, or if the |
| | program has not executed a SEND OUTPUT TO statement, PRINT USING is |
| | equivalent to DISP USING. |
| | |
---------------------------------------------------------------------------------------------
Syntax
PRINT USING
image
[;
output_item
[,
output_item
]...]
Parameters
image
Either a string expression or the line identifier of an
IMAGE statement. See "Format String" or the IMAGE
Statement for more information.
output_item
Numeric or string expression.
Examples
110 Image$="D,2D,4A,2X,6A"
120 IMAGE 4A,AAA,3A
130 Image1=120
210 PRINT USING 300; Num, Str$, A+B
220 PRINT USING Image1; S$(2,6), T$[1;3], S$(1,4)[5,7]
230 PRINT USING Image$; A, B, C$, D$