Writes zero or more characters to the terminal.
Examples
In the following example, WRITE * rings the bell on the user’s terminal, displays a prompt, and clears the input buffer of any characters received but not yet used.
SET eek="No. I can't accept that reply"
WRITE *7,eek,*-10
The following two examples show the difference between WRITE *-1 and WRITE *-10. In both cases, the user responds to the first READ and presses ENTER, then types ahead during the two pauses caused by the HANG commands:
READ "type:",x HANG 4 WRITE *-1 HANG 4 READ "type:",y
In the above example, InterSystems IRIS clears the input buffer when the second READ is issued. Thus any text typed during either HANG is cleared from the buffer.
READ "type:",x HANG 4 WRITE *-10 HANG 4 READ "type:",y
In the above example, InterSystems IRIS immediately clears the input buffer when WRITE *-10 is issued. Thus any text typed during the first HANG is cleared, but any text typed during the second HANG is supplied to the second READ command.
In the following example, WRITE /mnemonic uses the control mnemonic CUP (CUrsor Position) to move the cursor to the third column of the fourth line on the Terminal. In this example, the predefined mnemonic space ^%X364 is specified in the USE command, and the name of an open Terminal device is specified using the terminal variable. See Predefined Mnemonic Spaces for Terminals for a description of ^%X364.
USE terminal:(80:"BP"):"%X364"
SET %1=3,%2=4
WRITE /CUP(%1,%2)