TamConstantsImpl.mesa
Copyright © 1987 by Xerox Corporation. All rights reserved.
Last Edited by: Bell April 28, 1987 2:51:23 pm PDT
Last Edited by: Alan Bell July 22, 1987 5:42:07 pm PDT
DIRECTORY
CD,
List,
Tam,
TamarinUtil;
TamConstantsImpl: CEDAR PROGRAM
IMPORTS TamarinUtil
EXPORTS Tam = BEGIN
LORA: TYPE = List.LORA;
mask: PUBLIC CD.Design ← NIL;
C: PUBLIC PROC [field: ATOM] RETURNS [value: INT] = {
Returns the value for a given field
consts: LORA ← TamarinUtil.GetTamarinConstants[];
value ← SELECT field FROM
$sMI => 2,
ENDCASE => ERROR;
FOR i: LORA ← consts, i.rest UNTIL i = NIL DO
pair: TamarinUtil.TamConst ← NARROW[i.first];
IF pair.key = field THEN RETURN [pair.val];
ENDLOOP;
value ← SELECT field FROM
$sMI => 120,
$sClocks => 6,
$pClock2 => 0,
$pClock => 1,
$pWriteOk => 2,
$pnClock => 3,
$pnClock2 => 4,
$pDoneC =>5,
ENDCASE => ERROR;
};
END.