POV-Ray : Newsgroups : povray.beta-test : Bug List : Re: Bug List Server Time
28 Jul 2024 18:24:12 EDT (-0400)
  Re: Bug List  
From: Tim Attwood
Date: 6 Feb 2008 21:39:30
Message: <47aa6f62$1@news.povray.org>
>> Its a wacky way to handle variable declarations, and probably the reason
>> why "most" languages separate variables and functions/macros, which much
>> clearer syntax.
>
>  OTOH it allows embedding #-commands almost everywhere, which is quite
> handy. For example, you can put #while loops inside object declarations,
> etc.
>
Maybe in 4.0 we should have strict semicolons for #declares?

I still think it'd be good to give a warning that a #declare ends inside
an uncompleted control structure. Think about a loop... if the
first object is "eaten" by the #declare, then the remaining iterations
are rendered, then the #while statement really belongs to the body
sometimes and the #declare sometimes, it's poorly defined.

#declare Weird =
#while (...)
  object {...}
  ...
#end

Does anyone actually use this for anything?


Post a reply to this message

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