MODULE PathTest; (* A module to test that the PS functions for reading the current path are working correctly. *) PROC UnparseList(p, l) IS SAVE PS IN PS.MoveTo(p); Show.L("["); DO l # NIL -> VAR c, txt IN IF CDR(l) = NIL -> c := "]" | c := "," FI; txt := Unparse.Value(CAR(l)); ShowLine.L(txt & c) END; l := CDR(l) OD END END; (* Unparse the top-level elements of "l" in a left-justified, vertical list starting at "p". *) PROC Cmd0() IS IF VAR a ~ (24.28, 24.7), b ~ (41.11, 178), c ~ (88.29, 187), d ~ (184.1, 71.28), e ~ (169.8, 25.41), f ~ (11.77, 494.7), g ~ (72.11, 124.2) IN (b, c) CONG (d, e) -> PS.MoveTo(a); PS.LineTo(b); PS.CurveTo(c, d, e); PS.Close(); PS.MoveTo(a); PS.LineTo(g); UnparseList(f, PS.CurrentPath()) END FI END;