Introduction MTB Statements File System Compiler Applications Reference Guide Index

Language Structure Data Division I/O Format Division Procedure Division Mnemonics

(SF)

Mnemonic: (SF)
Hex equivalent: "@0A@"
Discussion: Start foreground display.

The (SF) control code sets foreground display mode and causes subsequent characters to be displayed as foreground characters.

Note: The default display mode is foreground.

Characteristics of foreground mode:

  • Foreground mode is used for keyboard data entry and for program display of data for operator modification and subsequent transmission to the program.

  • Foreground characters appear in the configured foreground color.

  • The cursor may be positioned anywhere within the boundaries of a foreground field.

  • Pressing the Tab key while the cursor is in a foreground field moves the cursor to the beginning of the next foreground field, skipping over any intervening background display areas.

    If the cursor moves forward past a transmit delimiter (a (TM) or (TP) mark), data will be transmitted to the receiving field(s) in the program.

  • Foreground and background can be mixed in one FORMAT statement, as long as the appropriate control codes (i.e., (SF) and (SB)) are used to start each operation.
Example:
100 FORMAT (SB);"ENTER CODE NUMBER:";(TM);(SF);"    ";(TM);@(0,0)
    .
    PRINT (0,100)
    INPUT (0) CODE$
This example shows how to use the start foreground control code in the middle of a FORMAT statement. This FORMAT starts out by entering background mode and displaying a program prompt. Next, the program places a transmit mark, switches to foreground, displays 5 blanks, places another transmit mark, and returns the cursor to "home" position (column 0, row 0).