User guide

56 CHAPTER 3. THE LIBRARY
newline() CIN:y, POS:y, NAT:y
This simply outputs the newline character (’*n’) to the currently selected output
stream.
newpage() CIN:y, POS:y, NAT:y
This simply outputs the newline character (’*p’) to the currently selected output
stream.
res := note(scb, posv) CIN:y, POS:y, NAT:y
If scr is a fil e stream, this function sets posv!0 and posv!1 to the cur r ent block
number and position within that block. For RAM streams, posv!0 and pos v !1 are set
to zero and the position within the stream buffer. The result is TRUE if scb i s a fil e or
RAM stream, and FALSE otherwise.
scb := output() CIN:y, POS:y, NAT:y
This function returns cos, the SCB of the currently selected output stream.
scb := pathfindinput(name, pathname) CIN:y, POS:y, NAT:y
This function opens an input stream. If name is the string "*" then input comes
from standard input which is normally the keyboard, otherwise name is taken to be
a filename. If name is a relative file name and pathname is non zero, the directories
specified by the shell variable pathname are searched. The directories specified by the
shell variab l e are separated by either semicolons or colons, al thou gh under Windows
only semicolons are allowed. If the prefix string is non null and the filename, possibly
prefixed by a directory name, is relative then the prefix string is prepended before the
file is opened. If the file cannot be opened pathfindinput returns zero.
res := point(scb, posv) CIN:y, POS:y, NAT:y
This function sets the position of stream scb to that specified in posv. If the stream
is to or from a file posv!0 specifies the new block number and posv!1 specifies the
position within that block. If the new position is in a di ffer e nt block the buffer may
have to be written out and new data read in. It returns TRUE if successful, even if
positioned just after the last block of the file, ie block=lblock+1 and pos=end=0. It
returns FALSE, otherwise, possibly b ec aus e the stream is not pointable or the posv is
out of range.
For RAM streams posv!0 should be zero and posv!1 s houl d be a posi t i on in the
current stream buffer.
res := put
record(v, recno, scb) CIN:y, POS:y, NAT:y
This attempts to write a record numbered recno to the file whose stream control
block is scb taking data from the vector v. The record length must have been set already
by a call of setrecordlength. If put
record is successful it returns TRUE, otherwise it
returns FALSE. If the last record of a file has number n, it is permissible to extend the
file by writing record n+1, but not one with a larger record number.
res := qpkt(pkt) CIN:n, POS:y, NAT:n
This Cintpos function queues the given packet on the end of t he work queue of the