ImagerSwitches.mesa
Copyright
Ó 1988, 1991 by Xerox Corporation. All rights reserved.
Michael Plass, October 14, 1988 12:18:28 pm PDT
Interface for setting/getting global switches.
DIRECTORY Rope
USING [
ROPE];
ImagerSwitches:
CEDAR
DEFINITIONS
~
BEGIN
Define:
PROC [switch:
CHAR['a..'z], name:
ATOM, doc: Rope.
ROPE, defaultValue:
REF]
RETURNS [
CHAR['a..'z]];
MultipleDefinition:
ERROR [switch:
CHAR];
Describe:
PROC [switch:
CHAR['a..'z]]
RETURNS [name:
ATOM, doc: Rope.
ROPE, defaultValue:
REF, value:
REF];
Set:
PROC [switch:
CHAR['a..'z], name:
ATOM, value:
REF];
Undefined:
ERROR [switch:
CHAR];
Value:
PROC [switch:
CHAR['a..'z]]
RETURNS [
REF] ~
INLINE {
RETURN [val[switch]]};
val:
PRIVATE ARRAY
CHAR['a..'z]
OF
REF;
BoolValue:
PROC [switch:
CHAR['a..'z]]
RETURNS [
BOOL] ~
INLINE {
RETURN [val[switch]#
NIL]};
Use $true and NIL for boolean switches.
END.