POV-Ray : Newsgroups : povray.beta-test : beta 32 - buglist : Re: beta 32 - buglist Server Time
5 Oct 2024 15:22:13 EDT (-0400)
  Re: beta 32 - buglist  
From: Tim Attwood
Date: 8 Apr 2009 16:05:23
Message: <49dd0383$1@news.povray.org>
>  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

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