-- RefAnyOps.mesa -- Last Modified By Warren Teitelman on August 31, 1982 1:59 pm -- Last Modified By Paul Rovner on May 13, 1983 10:25 am DIRECTORY AMTypes USING [TV]; RefAnyOps: CEDAR DEFINITIONS = BEGIN TV: TYPE = AMTypes.TV; EqRefs: PUBLIC PROC[x, y: REF ANY] RETURNS[BOOL]; means x and y are both refs to the same bits, e.g. if x and y are both REF LONG INTEGER, then this says that x^ = y^. Note that x=y is true only if x and y are the same REFs. EqTVs: PUBLIC PROC[x, y: TV] RETURNS[BOOL]; EqualRefs: PUBLIC PROC[x, y: REF ANY] RETURNS[BOOL]; means that x and y would print identically using PrintRefAny, i.e. decomposes x and y through all of its nested refs and substructures, applying Equal to the components. EqualTVs: PUBLIC PROC[x, y: TV] RETURNS[BOOL]; ContainedIn: PROC[x: REF ANY, y: REF ANY, useEqual: BOOL _ FALSE] RETURNS[BOOLEAN]; returns TRUE if x is contained somewhere in the components of y, using Equal as the if useEqual is TRUE, otherwise using eq. Subst: PROC [new, old, expr: REF ANY] RETURNS [REF ANY]; generic substitution DSubst: PROC [new, old, expr: REF ANY] RETURNS[REF ANY]; like Subst except does not allocate any storage Copy: PROC [ref: REF ANY] RETURNS[REF ANY]; END.