CTL Variable - Get CTL Value

Syntax

CTL

Description

The CTL variable returns a value depending on the field terminator most recently encountered during input from a device or file. The CTL variable is for application programs designed for user-specified action through simple keystrokes. Each field terminator maps to a particular CTL value, and the developer can modify the recognized terminators and their CTL values. The following table lists the default CTL values. PRO/5 recognizes various field terminators. See the READ verb for additional information.

Input Character

ASCII Character

CTL Value

$0D$

CR (Carriage Return)

0

$0A$

LF (Linefeed)

0

$00$

NUL (Null)

0

$1C$

FS (field separator)

1

$1D$

GS (group separator)

2

$1E$

RS (record separator)

3

$1F$

US (unit separator)

4

IF SIZ= OPTION IS SATISFIED     5

These values may be modified using the "!TERMS" global string entry. See the STBL() function, and STBL Formats in the User's Reference Guide for additional information.

Examples

1030 ON CTL GOTO 1040,1040,0900,0100,5000
0100 IF CTL=5 THEN GOTO 1234

See Also

Variables - Alphabetical Listing