HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
6- 5
* Produce output, but do not specify format.
* Are the BEEP, DISP, and PRINT statements.
* Numeric format statements that have the following characteristic:
* Specify format for numeric output of the DISP and PRINT
statements.
* Output device specification statements that performs one of the
following:
* Directs output to specific output devices.
* If a program does not contain output device specification
statements, then all output from the program and the HP Business
BASIC/XL interpreter is displayed on the standard list device.
If HP Business BASIC/XL is running interactively, the standard
list device is the terminal. If HP Business BASIC/XL is running
in a job stream, the standard list device is the line printer of
the computer system that HP Business BASIC/XL is running on. The
MARGIN statement sets the terminal screen margin.
Each statement is defined in chapter 4.
The Display List
Commas and Semicolons in Display List. A comma or semicolon in the
display list separates individual output items in the
output_item_list
.
Table 6-5 summarizes the differences between commas and semicolons as
separators.
Table 6-5. Semicolon vs Comma in Display List
---------------------------------------------------------------------------------------------
|| | |
| Separator | Second item is displayed | Display Enhancements Active from |
|| |First Item Remain Active |
|| | |
---------------------------------------------------------------------------------------------
|| | |
| Semicolon | Immediately after first item. | Yes. |
|| | |
---------------------------------------------------------------------------------------------
|| | |
| Comma | At beginning of next output field. | No. |
|| | |
---------------------------------------------------------------------------------------------
If a DISP or PRINT statement ends with a comma or a semicolon, then it
does not print a carriage return and a line feed after its display list.
Subsequent output appears on the same line.
If a DISP or PRINT statement does not end with a comma or semicolon, it
prints a carriage return and a line feed after its display list.
Subsequent output to the same device appears on the next line.
Array References in Display List. The DISP or PRINT statement prints an
array in row-major order; that is, the rightmost subscript varies
fastest. Each time the rightmost subscript reaches its maximum value,
the DISP or PRINT statement prints a carriage return and a line feed.
The spacing of array elements depends on what follows the array
specification in the display list, as shown in Table 6-6.
Table 6-6. Semicolon vs Comma After an Array
---------------------------------------------------------------------------------------------
|| | |
| If array is | Numeric elements are printed | String elements are printed |
| followed by |||
|| | |
---------------------------------------------------------------------------------------------
|| | |
| Semicolon | Side by side. | On consecutive output lines. |