Guardian Programmer's Guide

Table Of Contents
Communicating With Terminals
Guardian Programmer’s Guide 421922-014
10 - 16
Controlling Forms Movement
Controlling Forms Movement
The SETMODE and CONTROL procedures explicitly control forms movement in
conversational mode.
Controlling Spacing
Use SETMODE function 6 to change between single spacing and no spacing when
writing data to the terminal. In single spacing the system appends a carriage
return/line feed sequence to each write operation. No spacing gives you the option of
not sending a carriage return/line feed sequence; if you choose not to send the
carriage return/line feed sequence, then successive writes appear on the same line.
Single spacing is the default spacing.
The following code turns off single spacing and positions the cursor following the last
character written:
LITERAL SET^SPACE = 6,
NO^SPACE = 0;
.
.
CALL SETMODE(TERMNUM,
SET^SPACE,
NO^SPACE);
IF <> THEN ...
The following code turns single spacing back on again:
LITERAL SPACE = 1;
.
.
CALL SETMODE(TERMNUM,
SET^SPACE,
SPACE);
IF <> THEN ...
Another reason for using no spacing would be if you needed to overprint on a hard-
cop
y terminal. By appending a carriage return character to the data to be written, you
can cause a carriage return without a line feed:
LITERAL SET^SPACE = 6,
NO^SPACE = 0;
DEFINE TWO^TENTHS^OF^SECOND = 20D;
STRING .SBUFFER[0:511];
.
.
CALL SETMODE(TERMNUM,
SET^SPACE,
NO^SPACE);
IF <> THEN ...