User guide
3.2. GLOBAL VARIABLES 43
modules hold the relocatable byte stream interpretive code used by all BCPL interpre-
tive systems. Constants with names ending with 64 are used in the 64-bit version of
Cintcode. For more details, see the description of loadseg on page 68.
tickspersecond CIN:y, POS:y, NAT:n
This constant no longer exists since time is now measured i n milli-seconds (and dates
in days). In both Cintsys and Cintpos, delays measured in milli-seconds can be achieved
using delay(msecs) and delays until a specified absolute time can be done using
delayuntil(days, msecs). Under Cintpos, the clock dev i ce now takes packets that
specify absolute times (in days since 1 January 1970 and milli-second since midnight)
for their release. For example, sendpkt(notinuse, -1, 0, 0, 0, days, msecs) will
resume executi on when the time specified by days and msecs is reached. The second
argument (-1) spe ci fi es the clock device.
timeoutch CIN:n, POS:y, NAT:n
This is the value returned by rdch when a timeout occurs while trying to read from
a stream. Its value is normally -2. Cur r ently only TCP streams under Cintpos provide
the timeout mechani s m.
ug CIN:y, POS:y, NAT:y
This constant specified the first Global variable avail abl e to user programs. Cur-
rently ug=200 so globals below this value are reserved for system use and the standard
library. Since ug may change it would be wise to use it.
3.2 Global Vari a bl es
This section describes the global variables declared in libhdr.h.
cis, cos CIN:y, POS:y, NAT:y
These are, respectively, the currently selected input and output streams. Zero
indicates that no stream is selected.
colist CIN:n, POS:y, NAT:n
This holds the list of currently existing coroutines.
consoletask CIN:n, POS:y, NAT:n
This is a variable used by command language interpreters.
currco CIN:n, POS:y, NAT:n
This points to the currently executing coroutine.
currentdir CIN:n, POS:y, NAT:n
This is a string holding the name of the current working direct or y.
globsize CIN:y, POS:y, NAT:y
This variable is in global zero and holds the size of the global vector. Its value is
normally 1000.