DIRECTORY PW, Rope; PWTest: CEDAR PROGRAM IMPORTS PW = BEGIN ROPE: TYPE = Rope.ROPE; MyProc: PW.UserProc = BEGIN a, b, test: PW.Object; examples: PW.Design _ PW.OpenDesign["PWTest.dale"]; a _ PW.Get[examples, "a"]; b _ PW.Get[examples, "b"]; test _ PW.AbutX[a, b]; RETURN[test]; END; TestMapFunction: PW.UserProc = BEGIN -- Cells contact, noContact, edge, test: PW.Object; BinaryCount: PW.XYFunction = {RETURN[ SELECT TRUE FROM y=0 => edge, PW.XthBitOfN[y-1, x] => contact, ENDCASE => noContact]}; examples: PW.Design _ PW.OpenDesign["PWTest.dale"]; contact _ PW.Get[examples, "contact"]; edge _ PW.Get[examples, "edge"]; noContact _ PW.Inst[contact, LIST["contact"]]; test _ PW.MapFunction[BinaryCount, 0, 16, 0, 4]; RETURN[test]; END; PW.Register[MyProc, "PWTest"]; PW.Register[TestMapFunction, "TestMapFunction"]; END. 2PWTest.mesa Copyright c 1984 by Xerox Corporation. All rights reversed. Last Edited by: Monier, June 21, 1985 11:52:00 am PDT Bertrand Serlet March 25, 1986 11:32:28 pm PST Louis Monier August 22, 1985 1:11:41 pm PDT -- Cells n: INT; n _ PW.RequestInt["How many elements in the array, please?"]; Κι˜– "Cedar" stylešœ ™ Jšœ Οmœ1™