--* From jonms@pi.watson.ibm.com Wed Jan 20 10:55:46 1993 --* Received: from pi.watson.ibm.com by radical.watson.ibm.com (AIX 3.2/UCB 5.64/900524) --* id AA16720; Wed, 20 Jan 1993 10:55:46 -0500 --* X-External-Networks: yes --* Received: by pi.watson.ibm.com (AIX 3.2/UCB 5.64/4.03) --* id AA12669; Wed, 20 Jan 1993 11:02:42 -0600 --* Date: Wed, 20 Jan 1993 11:02:42 -0600 --* From: jonms@pi.watson.ibm.com --* Message-Id: <9301201702.AA12669@pi.watson.ibm.com> --* To: axc-bug@radical.watson.ibm.com, scm@bengals.watson.ibm.com --* Subject: asharp -r mandel.as in lisp: iterator doesn't terminate v25.3 --@ Fixed by: PAB Fri Oct 15 10:54:21 1993 --@ Tested by: lisp0.sh --@ Summary: Lisp gen. fixed --> testcomp --> testgen l -O --> testgen c -O --> testrun -O #include "aslib.as" #library ComplexLib "complex.aso" macro SI == SingleInteger F == DoubleFloat CF == Complex F Infinity == 0 import ComplexLib import CF inline CF maxIters: SI == 100 drawMand(minR:F, maxR:F, numR:SI, minI:F, maxI:F, numI:SI): SI == mandel(c: CF): SI == z: CF := 0 nc: SI := 0 for n in 1..maxIters while norm z < 4.0 repeat z := z*z + c nc := n if nc = maxIters then nc := Infinity nc for i in step(numI)(minI, maxI) for ic in 1..numI repeat for r in step(numR)(minR, maxR) for rc in 1..numR repeat drawPoint(rc, ic, mandel complex(r,i)) endRow() numR * numI #if TestRun ( drawPoint(x: SI, y: SI, n: SI): None == import String n = Infinity => print " " print(if n < 10 then " " else " ")(n) endRow(): None == print() import F drawMand(-2.0, -1.0, 25, -0.5, 0.5, 25) ) #else ( import Foreign: with drawPoint: (SI, SI, SI) -> None endRow : () -> None ) #endif