POV-Ray : Newsgroups : povray.newusers : Simple macro question : Re: Simple macro question Server Time
4 Nov 2024 17:32:29 EST (-0500)
  Re: Simple macro question  
From:
Date: 3 Jun 2003 22:21:56
Message: <3edd57c4@news.povray.org>
Hi,

After the first call of the Ring macro, n=360, so the #while statement
of subsequent calls of this macro will abort immediately. Putting the
line with "#declare n = 0;" between "#macro Ring(Up)" and "#while"
should correct this.

"#local AngleDegrees = ...;" is even better -- "#local" avoids unwanted
side effects on variables outside the macro, "AngleDegrees" is easier
to understand, and every identifier should have at least one uppercase
letter to avoid possible conflicts with (future) keywords. (Keywords will
never have uppercase letters.)

   Sputnik

--
----------------------------

fr### [at] computermuseumfh-kielde
----------------------------


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.