ScaledX.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created March 2, 1983
Edited by Michael Plass, March 2, 1983 11:26 am
Doug Wyatt, March 7, 1985 5:14:24 pm PST
Expansions for inlines in Scaled.mesa, callable by the interpreter or debugger.
DIRECTORY Scaled;
ScaledX: CEDAR PROGRAM
IMPORTS Scaled
= BEGIN
Value: TYPE = Scaled.Value;
FromInt: PROC [int: INTEGER] RETURNS [Value] = {RETURN[Scaled.FromInt[int]]};
PLUS: PROC [a, b: Value] RETURNS [Value] = {RETURN[a.PLUS[b]]};
MINUS: PROC [a, b: Value] RETURNS [Value] = {RETURN[a.MINUS[b]]};
UMINUS: PROC [a: Value] RETURNS [Value] = {RETURN[a.UMINUS[]]};
GREATER: PROC [a, b: Value] RETURNS [BOOLEAN] = {RETURN[a.GREATER[b]]};
LESS: PROC [a, b: Value] RETURNS [BOOLEAN] = {RETURN[a.LESS[b]]};
Max: PROC [a, b: Value] RETURNS [Value] = {RETURN[a.Max[b]]};
Min: PROC [a, b: Value] RETURNS [Value] = {RETURN[a.Min[b]]};
Floor: PROC [a: Value] RETURNS [INTEGER] = {RETURN[a.Floor[]]};
Ceiling: PROC [a: Value] RETURNS [INTEGER] = {RETURN[a.Ceiling[]]};
Round: PROC [a: Value] RETURNS [INTEGER] = {RETURN[a.Round[]]};
Float: PROC [a: Value] RETURNS [REAL] = {RETURN[a.Float[]]};
FromReal: PROC [real: REAL] RETURNS [Value] = {RETURN[Scaled.FromReal[real]]};
Halve: PROC [a: Value] RETURNS [Value] = {RETURN[a.Halve[]]};
END.