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

54 Chapter2
Controlling Asynchronous Devices Programmatically
MPE/iX System Intrinsics
this parameter passes a new value and returns the previous value to
the program in the same call. FCONTROL functions are discussed
throughout this manual.
Functional Returns
Some intrinsics return a value to the calling program through a
functional return. Functional return values result from or are altered
by the intrinsics of which they are a part. In examples and calling
syntax depicted in this manual, they are shown in assignment
statements, with the symbol := used as the operator to designate that
the functional return parameter is assigned the value of the result of
the intrinsic call. The functional return parameter is shown on the left
of the operator, with the call to the intrinsic on the right, as in the
following example:
lgth
:=FREAD(filenum,buffer,length);
Keep in mind that while functional returns are always demonstrated in
assignment statements in this manual they need not be used
exclusively in this way. They can also be used in output statements, as
one of the parameters in a parameter list, and in conditional
statements.
Unlike the values returned in positional parameters, which are a report
of current status, functional return values are the result of the activity
of the intrinsic. The FREAD intrinsic reports back the length of the
message read. Likewise, the FOPEN (and HPFOPEN) intrinsic reports
back a file number, which can then be used by other intrinsics called by
the same program.
The intrinsics discussed in this manual which yield functional return
values are FOPEN, FREAD, IOWAIT, IODONTWAIT, READ and
READX. See Chapter 8, “Intrinsics Reference,” for their usage and
syntax descriptions.