SNAX/APN Application Programming Manual

The ITI Interface
SNAX/APN Application Programming Manual420111-001
3-8
Enabling Line Feed (SETMODE Function 6)
Enabling Line Feed (SETMODE Function 6)
When you use the WRITE procedure call to send output to the terminal, you can specify
whether you want to associate a carriage return/line feed (CR/LF) with each write
operation using function 6 of the SETMODE procedure. If you specify no line feed, no
CR/LF is issued. If line feed (the default) is specified, a CR/LF is issued either before
or after the write operation is performed, depending on the line feed mode; see Setting
Line Feed Mode (SETMODE Function 27) on page 3-8 later in this subsection.
The syntax of SETMODE function 6 is as follows:
param1
0 No line feed.
1 line feed (default).
For example, if param1 is 0, output from consecutive write operations stays on the
same line until the number of characters exceeds the physical limit of the screen.
Setting Line Feed Mode (SETMODE Function 27)
When you use a WRITE procedure call to send data to the screen, you select either
prespacing or postspacing to control carriage return and line feed by using SETMODE
function 27:
param1
0 Postspacing (default).
1 Prespacing.
If prespacing is selected, a carriage return/line feed (CR/LF) is issued before output is
printed; each WRITE or WRITEREAD procedure call writes the output to the
beginning of a new line. If postspacing is selected, a CR/LF is issued after output is
printed; the cursor is positioned at the beginning of a new line after each WRITE or
WRITEREAD procedure call.
This function only applies if line feed is selected (SETMODE function 6).
CALL SETMODE ( filenum , 6 , param1 ) ;
Note. When no line feed is specified, outputs of two consecutive WRITE procedure calls are
separated by a space, which is the field attribute byte inserted by ITI. See Sending and
Receiving Data on page 3-2 earlier in this section.
CALL SETMODE ( filenum , 27 , param1 ) ;