POV-Ray : Newsgroups : povray.pov4.discussion.general : I want to be rid of my stupid mistakes : Re: I want to be rid of my stupid mistakes Server Time
6 May 2024 19:03:31 EDT (-0400)
  Re: I want to be rid of my stupid mistakes  
From: scott
Date: 20 Aug 2009 09:48:28
Message: <4a8d542c@news.povray.org>
> #macro Next()
>   #declare I=I+1;
> #end
>
> #declare I=0;
> #while (I < Limit)
>   Next()
> #end
>
> No mention of I anywhere in the loop, yet perfectly finite.
>
> You *must* dig into *every* macro to catch this.

The parser re-parses the macro every time it is called though, doesn't it? 
So the parser simply needs to look out for any "#declare I" any time it is 
parsing commands within the loop, no matter if it is in a macro or not.


Post a reply to this message

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