Skip to main content

Explicit Terminator Characters

Explicit Terminator Characters

The terminator parameter in the OPEN or USE command lets you define specific characters as terminators for a READ or WRITE command. These explicit terminators can be used to supplement the terminator characters supplied by the specified protocol. The terminator parameter can also be used to override the designation of a character by the protocol, and instead designate it a terminator character. The exceptions to this ability to redefine a character as a terminator are: ASCII 0 (NULL), ASCII 3 (Ctrl-C), and the two output control characters Ctrl-Q (XON) and Ctrl-S (XOFF). These retain their functionality, and cannot be redefined as terminator characters.

Example

This example defines Z, Backspace and Tab as terminators for the principal device. The underscore is the concatenate operator.

  USE 0:("":"":"Z"_$CHAR(8,9))

By issuing an OPEN command for an unowned terminal, you implicitly clear the InterSystems IRIS internal list of explicit terminators. When a protocol string appears, InterSystems IRIS then does the following:

  1. Clears its list of explicit terminators.

  2. Sets protocols according to the protocol string.

  3. Copies a terminator string, if any, into the internal list of explicit terminators.

    The following table gives examples of explicit terminator strings.

Terminator Strings: Examples
Terminator String Definition
USE 0:(80:"C":$CHAR(27)) The Escape character terminates a READ rather than beginning an escape sequence.
USE 0:(80:"C":"") The empty string clears all terminators.
USE 0:(80:"C") Omitting the terminator parameter when you specify protocol clears all terminators.
USE 0:(80) or U 0:80 Omitting both protocol and terminator leaves terminators unchanged.
FeedbackOpens in a new tab