Creating Atoms
EmptyAtom: PROC RETURNS[ATOM]; -- returns the atom with pname = ""
MakeAtom:
PROC [pName: Rope.
ROPE]
RETURNS[
ATOM];
The following identity holds: Rope.Equal[r1,r2] <=> MakeAtom[r1] = MakeAtom[r2]. In particular, MakeAtom[""] = MakeAtom[NIL] = emptyAtom. Note that NIL # MakeAtom[NIL].
MakeAtomFromChar: PROC [char: CHARACTER] RETURNS[ATOM];
MakeAtomFromRefText: PROC [rt: REF READONLY TEXT] RETURNS[ATOM];
Property list operations
provides a way of associating information with unique keys (atoms) using a single global name space.
Note: An alternative way of associating information with unique keys...
that can be arbitrary REFS, in a non-global fashion using specific structures (hash tables) is provided by the RefTab interface, which is also exported by ListsAndAtoms.bcd
GetPropertyList: PROC [atom: ATOM] RETURNS[PropList]; -- gets entire property list
GetProp: PROC [atom: ATOM, prop: REF ANY] RETURNS[REF ANY];
GetPropFromList: PROC [propList: PropList, prop: REF ANY] RETURNS[REF ANY];
PutProp: PROC [atom: ATOM, prop: REF ANY, val: REF ANY];
PutPropOnList: PROC [propList: PropList, prop: REF ANY, val: REF ANY] RETURNS[PropList];
RemProp: PROC [atom: ATOM, prop: REF ANY];
RemPropFromList: PROC [propList: PropList, prop: REF ANY] RETURNS[PropList];
Enumeration of atoms
MapAtoms: PROC[proc: PROC[atom: ATOM]];
FindAtom: PROC[proc: PROC[atom: ATOM] RETURNS[stop: BOOLEAN]] RETURNS[ATOM];