TVGuide.mesa
Russ Atkinson, April 25, 1983 8:28 pm
DIRECTORY
Rope USING [ROPE],
RTBasic USING [TV];
TVGuide: CEDAR DEFINITIONS = BEGIN OPEN Rope, RTBasic;
RegisterTV: PROC
[name: ROPE, tv: TV, help: ROPENIL, overwriteOld: BOOLTRUE]
RETURNS [old: TV, oldHelp: ROPE, found: BOOL];
Registers the TV under the given name in the global TV table. It is recommended that the name contain the & character to avoid obscuring variables names. This routine returns the old TV under the given name (if one existed) and a flag indicating whether or not there was an old TV (it is perfectly OK to have NIL as a TV).
UnregisterTV: PROC
[name: ROPE, overwriteOld: BOOLTRUE]
RETURNS [old: TV, oldHelp: ROPE, found: BOOL];
Removes the name-value association from the global TV table. This routine returns the old TV under the given name (if one existed) and a flag indicating whether or not there was an old TV (it is perfectly OK to have NIL as a TV).
LookupTV: PROC
[name: ROPE] RETURNS [tv: TV, help: ROPE, found: BOOL];
Finds the named TV in the global TV table.
Browse: PROC
[proc: Ruminant, data: REFNIL] RETURNS [stopped: BOOL];
Browses through the registered in no particular order. Returns TRUE if the user stopped the enumeration, FALSE if not. Changes made during the enumeration may or may not be passed on to the caller's proc.
Ruminant: TYPE = PROC
[name: ROPE, help: ROPE, tv: TV, data: REF] RETURNS [stop: BOOL];
The type of procedure that the user gives to the enumerator.
END.