DISPLAY statement

The DISPLAY statement displays a message on the user's screen and optionally requests the user to enter a response to the message.

Read syntax diagramSkip visual syntax diagram
>>-DISPLAY--(expression)--+-------------------+----------------->
                          '-REPLY--(char-ref)-'   

>--+---------------------------------------------+--;----------><
   |             .-,-.                           |      
   |             V   |                           |      
   '-ROUTCDE--(----x-+--)--+-------------------+-'      
                           |          .-,-.    |        
                           |          V   |    |        
                           '-DESC--(----y-+--)-'        

expression
Is converted, where necessary, to a character string. This character string is displayed. It can contain mixed character data. If the expression has the GRAPHIC attribute, it is not converted.
REPLY (char-ref)
Specifies a character reference that receives the user-entered response. The response can contain CHARACTER, GRAPHIC, or mixed data.

The REPLY option suspends program execution until the user enters a response.

If GRAPHIC data is entered in the REPLY, it is received as character data that contains mixed data. Such character data can be converted to GRAPHIC data by using the GRAPHIC BUILTIN.

Start of changeROUTCDEEnd of change
Start of changeSpecifies one or more values to be used as the ROUTCDE in the WTO. The values must be unsigned integer constants between 1 and 16. The WTO suboption of the DISPLAY compiler option specifies the default value.End of change
Start of changeDESCEnd of change
Start of changeSpecifies one or more values to be used as the DESC in the WTO. The values must be unsigned integer constants between 1 and 16. The WTO suboption of the DISPLAY compiler option specifies the default value. End of change

Start of changeROUTCDE and DESC are ignored except when the DISPLAY(WTO) option is in effect.End of change

Example

The statement display ('Communication link established.'); displays this message:

Communication link established.





Published: 23 December 2018