NBTRACE
— Trace Noticeboard Contents
TIME
— Time Noticeboard Operations
EXERCISE
— Exercise Noticeboard Routines
WORDS
— Generate Tree-structured Noticeboard
Several demonstration programs are shipped with the system and are described here (it is assumed
that the symbol “program
” has been set up to run the program program
). All of these programs are
written in C.
NBTRACE
— Trace Noticeboard ContentsNBTRACE
lists the contents of a noticeboard definition file or of an active noticeboard.
The name of the definition file (assumed extension .NBD
) or of a noticeboard item can be given as a
command line parameter and will be prompted for if it is not given. The program first attempts to find
the noticeboard and if that fails (because the noticeboard doesn’t exist) it attempts to restore the
noticeboard from the definition file. Then it locates the specified item and lists it and all items below it.
VMS-style wild cards can be used. Thus
might result in the following
and
is a useful trick to suppress listing of lower level items (on the assumption that none of them are called
X
).
When no item name is given, general information about the noticeboard’s size and owner is given, as in
TIME
— Time Noticeboard OperationsTIME
times various noticeboard operations. It produced the timings listed in Section 6.
The user chooses how many items the noticeboard should contain, which item should be
used for timing NBS_FIND_ITEM
, how many iterations to perform and the values of the
INCREMENT_MODIFY
and CHECK_MODIFY
flags. The program produces a report in TIME.LIS
. For
example:
EXERCISE
— Exercise Noticeboard RoutinesEXERCISE
calls all NBS
routines and triggers all reasonable errors. It produces a report in EXERCISE.LIS
in which any unexpected results have an asterisk in the first column. The total error count is reported
at the bottom and this should always be zero. If it is non-zero there could be a resource-related
problem (or even a bug in the NBS
routines). For example:
WORDS
— Generate Tree-structured NoticeboardWORDS
generates a tree-structured noticeboard with one item for each word found in a file provided by the
user. The user also specifies a “cluster size”, which is a measure of how deep the tree is (the tree has about
cluster
size
levels). Once the noticeboard has been created the user can type in words and is told whether they
appeared in the file. Exit with
. The example given for ^
ZNBTRACE
is of a noticeboard created using
WORDS
.