|
|
> Can you give an example of this?
>
> The way povray parses SDL, especially things like nested declares, may
> not
> always be completely intuitive, but not necessarily buggy.
Sure, I realize it's been this way for a while...
essentially since it's ok to have other declares and
partial control structures inside of a declare there's no
check being done inside the declare until it is used.
In this example if Wierd contains the code up until
the pass_text object, then the parsing should fail
when the first #end is parsed, instead the #end is
matched to #while inside of the value of the Wierd #declare.
// misformed #declare
#declare Weird = #declare Aval = 1;
// other properly formed statements
#declare PigVal = pigment {rgb <0,0,0>};
#declare ObjVal = sphere {<0,0,0>,1};
#if (true=true)
#local c=0;
#while (c=0)
// this object ends the misformed #declare and doesn't render
object {pass_text}
// this object renders normally
object {fail_text}
#local c=1;
#end
#end
Post a reply to this message
|
|