AlgebraClassesImpl.mesa
Last Edited by: Arnon, June 10, 1985 4:19:22 pm PDT
DIRECTORY
Atom,
Rope,
IO,
AlgebraClasses,
Basics;
AlgebraClassesImpl:
CEDAR
PROGRAM
IMPORTS Atom
EXPORTS AlgebraClasses =
BEGIN
OPEN AlgebraClasses;
Miscellaneous Operations
FlavorToRope:
PUBLIC
PROC [flavor: ClassFlavor]
RETURNS [rope: Rope.
ROPE]~ {
SELECT flavor
FROM
group =>
RETURN["Group"];
ring =>
RETURN["Ring"];
field =>
RETURN["Field"];
vectorSpace =>
RETURN["Vector Space"];
algebra =>
RETURN["Algebra"];
divisionAlgebra =>
RETURN["Division Algebra"];
ENDCASE;
};
GetProperty:
PUBLIC
PROC [structure: Structure, prop:
ATOM]
RETURNS [val:
REF ←
NIL] ~ {
RETURN[Atom.GetPropFromList[structure.class.propList, prop] ];
};
END.