User guide

Chapter 1
The System Overview
This document contains a full description of an interpretive implementation of
BCPL that supports a command language and low level interactive debugg er . As
an introduction, two example console sessions are presented to exhibit some of
the key features of both the single threaded version of the system (Cintsys) and
the interpretive version of Tripos ( Ci ntpos).
1.1 A Ci ntsys Console Session
When the Cintsys system is started (on a machine call ed c223) in the directory
bcplprogs/demo, its opening message is as follows:
c223$ cintsys
BCPL Cintcode System (30 Sept 2010)
0.000>
The characters 0.000> are followe d by a space chara ct er and is the comma n d
language prompt string inviting the user to type a command. The number gives
the execution time in seconds of the preceeding command. A program called
fact.b in directory com to comput e factorials can be displayed using the type
command as follows:
0.000> type com/fact.b
GET "libhdr"
LET start() = VALOF
{ FOR i = 1 TO 5 DO writef("fact(%n) = %i4*n", i, fact(i))
RESULTIS 0
}
AND fact(n) = n=0 -> 1, n*fact(n-1)
0.000>
The directive GET "libhdr" causes the standard library declarations to be
inserted at that position. The text:
1