Def:
PUBLIC ENTRY PROC [name:
ROPE, pgm: PgmNum] ~ {
ENABLE UNWIND => NULL;
IF pgm = nullPgmNum THEN ERROR Error[$badPgmNum];
pgmNumXlations ¬ CONS[ [name~name, pgmNum~pgm], pgmNumXlations ];
};
Undef:
PUBLIC
ENTRY
PROC [name:
ROPE ¬
NIL, case:
BOOL ¬
FALSE, pgm: PgmNum ¬ nullPgmNum] ~ {
ENABLE UNWIND => NULL;
nameWildCard: BOOL ~ Rope.IsEmpty[name];
pgmWildCard: BOOL ~ (pgm = nullPgmNum);
prev: LIST OF PgmNumXlation ¬ NIL;
FOR each:
LIST
OF PgmNumXlation ¬ pgmNumXlations, each.rest
WHILE each #
NIL
DO
IF (nameWildCard
OR Rope.Equal[name, each.first.name, case])
AND (pgmWildCard
OR (pgm = each.first.pgmNum))
THEN
-- delete -- {
IF prev = NIL THEN pgmNumXlations ¬ each.rest ELSE prev.rest ¬ each.rest;
}
ENDLOOP;
};