POV-Ray : Newsgroups : povray.general : Any way to avoid repeated parsing? : Re: Any way to avoid repeated parsing? Server Time
11 Aug 2024 13:20:54 EDT (-0400)
  Re: Any way to avoid repeated parsing?  
From: Ron Parker
Date: 21 Sep 1999 14:56:15
Message: <37e7d4cf@news.povray.org>
On Tue, 21 Sep 1999 19:50:19 +0200, Tomas Plachetka wrote:
>That's it. Then why not having simply #if (start, end)? 

I'm not sure I like this syntax.  For one thing, it's too easy to 
mistype a less-than as a comma.  For another, it doesn't convey 
the correct idea.  #if (start, end) seems to imply that it's 
shorthand for #if (start < clock & clock < end) when in fact it's 
another concept entirely: everything inside the #static block 
would be parsed for any frame where the clock is outside the 
prescribed limits, and it would be parsed at most once per 
rendering session with a clock value somewhere inside the limits. 
And keywords are fairly cheap.

>However, when nesting
>#if with #if(start, end), one could get in troubles. To 
>avoid this, you have to carefully restrict usage of 
>#if(start, end).

The only problems I see with nesting would be something like 

#if (clock > .5 )
  #static (.3,.6)
    ...
  #end
#end

or 

#static (.3,.6)
  #if (clock > .5 )
    ...
  #end
#end

and both of these are clearly misuses of the static qualifier:
the things being declared static are not in fact static over 
the declared range, and the user deserves whatever he or she
gets. :)


Post a reply to this message

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