POV-Ray : Newsgroups : povray.general : #declared Object Usage : Re: #declared Object Usage Server Time
11 Aug 2024 15:15:10 EDT (-0400)
  Re: #declared Object Usage  
From: Ron Parker
Date: 30 Jun 1999 17:52:17
Message: <377a9191@news.povray.org>
On Wed, 30 Jun 1999 14:43:09 -0700, Ken wrote:
>
>
>  When did this become legal syntax and why ?
>
>#declare B = box {-1,1}
> B
>
>  I have always been under the impression a declared object needed
>to be wrapped in an object statment to work properly.
>
>e.g. object {B}

It's not in the docs, therefore it's not technically legal.  But the 
toplevel parser basically says "If it's a directive or a camera or a 
few other top-level things, just do it, otherwise parse it as an object."

It's probably that way so light sources may be used wherever objects
may, such as in unions, and so that object{} blocks may be nested or
used within CSG with a little less work for the parser.  Don't ask me
to explain how I came to this conclusion.


Post a reply to this message

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