POV-Ray : Newsgroups : povray.general : Parse Error: No matching } in 'union', object identifier found instead : Re: Parse Error: No matching } in 'union', object identifier found instead Server Time
24 Apr 2024 00:45:19 EDT (-0400)
  Re: Parse Error: No matching } in 'union', object identifier found instead  
From: kendfrey
Date: 21 Jan 2019 07:10:01
Message: <web.5c45b60379c392cec059c35f0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> It's just how POV-Ray's language rolls: Pretty much wherever you use a
> non-trivial variable (i.e. not a number, vector, colour or string), you
> need to wrap that variable into a statement telling POV-Ray what to
> expect in that variable.
>
> For example, consider the following code:
>
>      union {
>          Foo
>          Bar
>          Fnord
>      }
>
> If such code were allowed, you would have to take a closer look at the
> variable `Fnord` to tell whether it is supposed to be another object, or
> rather e.g. a texture, transformation or what-have-you.
>
> As for why it was designed this way, I can only speculate; it might have
> been intended to make scenes easier to read for humans (back in the days
> when good variable names were short and cryptic), or easier to read for
> the parser.
>
> At any rate, this syntax quirk has survived the ages, and nobody has
> ever bothered enough to actively do anything about it.

Oh well, it's nice to know I wasn't just doing something dumb. Thanks!


Post a reply to this message

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