POV-Ray : Newsgroups : povray.advanced-users : Array looped-initialization syntax : Re: Array looped-initialization syntax Server Time
29 Apr 2024 02:03:29 EDT (-0400)
  Re: Array looped-initialization syntax  
From: clipka
Date: 16 Aug 2016 13:25:32
Message: <57b34c8c@news.povray.org>
Am 16.08.2016 um 18:45 schrieb Bald Eagle:
> I'm having some difficulty embedding a loop into an array declaration.
> Is this not allowed?

No; POV-Ray does not support any other directives (the things that begin
with a "#") inside a "#declare" statement.

> Do I have to declare the array and then initialize it afterward with #declare
> ExpandedArray [LoopVariable] = SomeValue;  ?

Yup.

> I'm also curious about how folks who code this type of thing handle the
> requirement for a comma, since the LAST element of the array doesn't have one.
> Is there internal POV-Ray Black Magic that handles this?

POV-Ray does allow a trailing comma after the last element. But
obviously that's of no help to you.


Post a reply to this message

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