Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)

Chapter 8 165
Intrinsics Reference
FCONTROL(1)
FCONTROL(1)
Parameters
controlcode 1 — Causes a carriage control or mode control directive
to be sent to the device.
param 16-bit unsigned integer by reference
(required)
Passes a value representing a carriage control or mode
control directive to a non spooled device.
Returns a value representing the prior mode control
setting when a mode control directive is specified.
Notes When FCONTROL is issued with a controlcode of 1,
param specifies either a mode control directive or a
carriage control directive to be applied to the file
specified in filenum.
You can use FCONTROL to pass carriage control
directives only if the file being output is not spooled.
For any files that are written to disk or spooled prior to
output, you must use the FWRITE intrinsic to pass
carriage control and mode control directives.
The Carriage Control directives passed through
FCONTROL are the same as those that are passed
through FWRITE. Table 9-3, “Selected Carriage
Control Directives,” on page 255 lists the octal codes
used for this purpose, along with their corresponding
carriage control actions. You will find this table in the
explanation of the FWRITE intrinsic later in this
chapter.
Carriage control can be passed throughFCONTROL for
a non-spooled file regardless of whether the file was
opened with CCTL or NOCCTL specified in the FOPEN or
HPFOPEN call.
Mode control can also be specified through FCONTROL
for non-spooled files. Mode control specifies whether a
carriage control directive takes effect before printing
(prespace movement) or after printing (postspace
movement). Mode control is selected through specific
octal codes from the Carriage Control table. A value of
%100 or %400 sets postspace movement, %101 or %401
sets prespace movement.