POV-Ray : Newsgroups : povray.newusers : Need help with "declare" : Re: Need help with "declare" Server Time
6 Sep 2024 12:14:31 EDT (-0400)
  Re: Need help with "declare"  
From: Jerry Anning
Date: 30 Apr 1998 23:42:12
Message: <35494494.643708C8@dhol.com>
yan### [at] pacbellnet wrote:
> 
> The code below gives the error:
>    no matching { in difference, box found instead
> 
> There must be something about declaring that I couldn't find in the doc.
> Would some kind soul please explain why I get this error?
> 
> -----------------------------
> #include "colors.inc"
> 
> #declare Dflgg = box {
>     <0, 0, 0>, <1, 1, .001>
>     pigment  { color Red }
>     finish { ambient .8 }
>     scale <40, 24, 1>
> }
> 
> difference
> {
>  Dflgg
>  box
>   {
>     <0, 0, -1>, <1, 1, .002>
>     pigment  { color  Blue  }
>     finish { ambient .8 }
>   }
> }

In the difference, say object { Dfflg } instead of just Dfflg.  You
don't always need to do this, but it doesn't hurt and the habit will
save problems like this.

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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