CreateLibrary:
PROC []
RETURNS [library: Library]
;
Creates a new, empty library.
Insert:
PROC [library: Library, key:
ROPE, ct: CellType, overWrite:
BOOL ←
FALSE]
RETURNS [first:
BOOL];
Inserts new key-CellType pair into library.
overWrite: may overwrite previous association in library
Returns first: key was not defined in library before.
May raise LibraryNotFound, resume is ok, and in that case no action is taken.
Fetch:
PROC [library:
REF, key:
ROPE]
RETURNS [ct: CellType
← NIL];
Looks up key in library, returns associated CellType (if any).
Returns NIL if CellType not found.
library: Union of Library & ROPE
May raise libraryNotFound, resume is ok, and in that case returns NIL.