The DISPLAY statement sends data to the display. The synonym CRT can be used in place of DISPLAY.
The DISPLAY statement is equivalent to a PRINT statement directed to the display.
The print.list contains any number of items (including zero) but must all appear on a single source program line. The individual items are expressions which can be evaluated and represented as strings.
Where multiple items are present, they are separated by commas. The DISPLAY statement will replace the comma by a TAB character, causing display to align to the next horizontal tabulation column, initially set to columns 0, 10, 20, 30, etc. The same effect can be achieved by inserting TAB characters in the data to be displayed.
A colon as the final token on the source line is not treated as a concatenation operator but as a special symbol which causes the normal line feed and carriage return at the end of the DISPLAY action to be suppressed.
When data is output to the display, QM will pause at the end of the screen and ask for confirmation to continue.
Press RETURN to continue, A to abort, Q to Quit, S to suppress pagination
Entering A will cause an abort to occur. Entering Q will quit from the current program or command. Entering S will continue display and suppress this prompt at the end of subsequent pages. Any other character causes display to continue up to the next prompt.
Pagination may be suppressed by use of any @(x, y) cursor positioning function. Note that this does not have to be sent to the screen; use of the function is sufficient. Thus a statement such as
DUMMY = @(0,0)
will suppress pagination even though nothing is displayed by this statement. Pagination may be turned on again by use of the PRINTER RESET statement.
DISPLAY "Error code " : STATUS()
This statement displays the literal string "Error code " and the value of the STATUS() function. The cursor is then positioned at the start of the next line.
DISPLAY "Enter product code " :
This program fragment displays a prompt for a product code to be entered. Note the use of the trailing colon to suppress the line feed so that the cursor is left after the prompt ready for the INPUT statement.
FOR I = 1 TO 10
DISPLAY I, RATE(I), TOTAL(I)
This example displays a three column table, lining up the columns with horizontal tabulation positions.