SunRPCPgmNames.mesa
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved.
Demers, October 25, 1990 10:35 am PDT
DIRECTORY
Rope
;
SunRPCPgmNames: CEDAR DEFINITIONS
~ {
Types
ROPE: TYPE ~ Rope.ROPE;
PgmNum: TYPE ~ CARD;
nullPgmNum: PgmNum ~ CARD.LAST;
Error: ERROR [code: ATOM];
$badName -- name in query not defined and not numeric literal
$badPgmNum -- nullPgmNum specified where valid pgm num required
$other
Query Operations
NameFromPgm: PROC [pgm: PgmNum] RETURNS [name: ROPE];
Return a name for the given program number if possible.
If there is no defined name for pgm, return a numeric literal.
PgmFromName: PROC [name: ROPE, case: BOOL ¬ FALSE] RETURNS [pgm: PgmNum];
Convert name to program number.
A numeric literal is acceptable as the name.
Name lookup is case-sensitive iff case is TRUE.
! Error[$badName]
Updating
Def: PROC [name: ROPE, pgm: PgmNum];
Add a mapping between name and pgm.
! Error[$badPgmNum]
Undef: PROC [name: ROPE ¬ NIL, case: BOOL ¬ FALSE, pgm: PgmNum ¬ nullPgmNum];
Delete all mappings matching specified name/case and pgm.
}.