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

4- 44
DISP
The DISP statement outputs several values. It can use output functions
to output control characters. The DISP statement is similar to the PRINT
statement. The only difference between the DISP and PRINT statements is
that the DISP statement uses the standard list device, and the PRINT
statement uses the output device specified by the most recently executed
SEND OUTPUT TO statement. If the most recently executed SEND OUTPUT TO
statement specifies the standard list device, or if the program does not
contain a SEND OUTPUT TO statement, then the PRINT statement is
equivalent to the DISP statement.
Syntax
[,]
DISP [
output_item_list
] [;]
Parameters
[{[,]...} ]
output_item_ list
[,]...
output_item
[{; }
output_item
]...
output_item
One of the following:
num_expr
str_expr
array_name
(*) Array reference. See "Array
References in Display List"
for more information.
{PAGE }
{{CTL} }
output_function
{{LIN} }
{{SPA} (
num_expr
)}
{{TAB} }
See "Output Functions in
Display List" for more
information.
FOR_clause
(FOR
num_var
=
num_expr1
TO
num_expr2
[STEP
num_expr3
],
d_list
)
See the section that follows,
"FOR Clause in Display List",
for more information.
, A separator. This prints each new item in a separate
output field.
; A separator. This prints each new item right next to
the previous item.
Examples
100 DISP
110 DISP,
120 DISP;
130 DISP X,X+Y;A$,LWC$(A$+B$);P(*),Q$(*);PAGE,TAB(10+X),
140 DISP Z(*), (FOR I=1 TO 10, Z(I); 2*Z(I); I*Z(I)), D$;
150 DISP A,,B
The DISP statement evaluates the expressions in the display list from
left to right and displays their values on the standard list device. It
displays numeric values in the current numeric output format (see
"Numeric Format Statements").
A DISP statement without a display list prints a carriage return and a
line feed (a CRLF) on the output file or device.