POV-Ray : Newsgroups : povray.beta-test : beta 32 - buglist : Re: beta 32 - buglist Server Time
5 Oct 2024 18:27:53 EDT (-0400)
  Re: beta 32 - buglist  
From: clipka
Date: 8 Apr 2009 20:30:00
Message: <web.49dd40cb1eef0732a08de100@news.povray.org>
"Tim Attwood" <tim### [at] anti-spamcomcastnet> wrote:

> 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.

Here's youre wrong assumption: Only macros defer execution of "preprocessing"
statements. #declares just defer the "materializing" of already built scene
objects by instead storing them in variable space.

That's the main difference between #declares and macros, which manifest in code
like:

#declare Pos = <1,2,3>;
#declare MySphere1 = sphere { Pos, 1 }

#declare Pos = <4,5,6>;
#declare MySphere2 = sphere { Pos, 1 }

object { MySphere1 }
object { MySphere2 }

as opposed to:

#declare Pos = <1,2,3>;
#macro MySphere1() sphere { Pos, 1 } #end

#declare Pos = <4,5,6>;
#macro MySphere2() sphere { Pos, 1 } #end


Post a reply to this message

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