-- RefAnyOps.mesa -- Last Modified By Warren Teitelman on August 31, 1982 1:59 pm DIRECTORY RTBasic USING [TV] ; RefAnyOps: CEDAR DEFINITIONS = BEGIN TV: TYPE = RTBasic.TV; -- PROCEDURES EqRefs: PUBLIC PROC[x, y: REF ANY] RETURNS[BOOLEAN]; -- 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[BOOLEAN]; EqualRefs: PUBLIC PROC [x, y: REF ANY] RETURNS [BOOLEAN] ; -- 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 [BOOLEAN]; ContainedIn: PROC [x: REF ANY, y: REF ANY, useEqual: BOOLEAN _ 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. สb– "Mesa" style˜Iprocš”ฯcSœฯk œ žœžœžœž œžœžœžœ žœœฯnœžœžœžœžœžœžœฒœŸœžœžœžœžœžœŸ œžœžœžœžœžœžœฎœŸœžœžœžœžœžœŸ œžœžœžœžœžœ žœžœžœžœ€œŸœžœžœžœžœžœžœœŸœžœžœžœžœžœžœ4œŸœžœžœžœžœžœžœžœ˜ฬ —…—ฮ6