$a invert=0; cap=0; capsh=0; und=0; undsh=0 $a line=80; page=0; top=0; bottom=0 $l LIBRARIES $p The function of libraries is to make available to programmers useful sets of related definitions and procedures for use in the construction of programs. In general, it is sensible to use a supported library where one is available rather than writing ad hoc routines. $p The main libraries are callable from both IMP and Pascal, with different include files for the two languages available in the directory INC -- the IMP versions have file-name extension .IMP and the Pascal versions have the extension .PAS. The relevant include file should be consulted for details of the parameter types in language-specific terms. $p For details of the pre-defined procedures available in a particular language, see the documentation for the language concerned. $b $l1 !; flags:Integer) The routine DEFINE ENUM PARAM is used to define an enumeration (TEXT should start with a sequence of comma-separated keywords) Procedure DEFINE BOOLEAN PARAMS(text:String[255]; Var variable:; flags:Integer) This routine is used to define a group of Boolean parameters as a set Procedure PROCESS PARAMETERS(parm:String[255]) This routine parses the string PARM (which will usually be derived from CLIPARAM) according to the definitions previously established by calls on the DEFINE ... PARAM routines, and sets up values accordingly. It then erases the definitions, that is, it can be called once only for any set of definitions. !PAGE General Utility Procedures: PAM (cont) Function PAM:Var Paminfo Result is a reference to the environment information relating to command parameters. Relevant fields are: GROUPSEP: the character chosen as group separator KEYFLAG: the character chosen as keyword flag !PAGE General Utility Procedures: File manipulation Function INFILENAME:String[255] Function OUTFILENAME:String[255] Function EXISTS(filename:String[255]):Boolean Function FILESIZE(filename:String[255]):Integer Function NINFO(filename:String[255]):String[255] Procedure OPENAPPEND(stream:Integer; filename:String[255]) Procedure CLOSEAPPEND Procedure CONNECT FILE(fname:String[255]; mode:Integer;Var start,len:Integer) Connect (in fact read in) the file denoted by FNAME to an area of store allocated from the heap START:= starting address; LEN := size of file in bytes The parameter MODE should be zero at present Procedure DELETE(filename:String[255]) Procedure RENAME(oldname,newname:String[255]) Procedure COPY(from,to:String[255]) Procedure PERMIT(filename,perms:String[255]) Procedure QUOTE(pass:String[255]) !PAGE General Utility Procedures: Terminal control Function TESTSYMBOL:Integer Result is -1 if no symbol available from terminal; otherwise result is the ordinal value of the symbol, which is skipped {Terminal modes:-} Const:Integer SINGLE {single character input without buffering}, NOECHO {no echoing of input characters}, NOTERMECHO {no echoing of terminators}, NOPAGE {no auto-paging of output}, Procedure SET TERMINAL MODE(m:Integer) Set terminal mode as specified by M as selection (sum) of flag values given above eg SET TERMINAL MODE(SINGLE+NOECHO) !> ! ! ! ! !>