POV-Ray : Newsgroups : povray.advanced-users : Evaluating macro result in array initialization Server Time
24 Sep 2021 04:57:50 EDT (-0400)
  Evaluating macro result in array initialization (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: Evaluating macro result in array initialization
Date: 1 Aug 2021 20:40:00
Message: <web.61073e8fe4a528721f9dae3025979125@news.povray.org>
I'm trying to create a mixed array with vectors by using macro calls to define
the point locations.

POV-Ray (qtpovray 3.8) squawks with "Parse Error: Expected 'array initializer
element', macro identifier found instead"

Is this something we can't do?   Seemed weird.

#declare Array =
array mixed [2][5] {
 {"text",    Macro(0.00, 0.90), ....


Post a reply to this message

From: jr
Subject: Re: Evaluating macro result in array initialization
Date: 2 Aug 2021 03:40:00
Message: <web.6107a076f4a53de65e0fed26cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> I'm trying to create a mixed array with vectors by using macro calls to define
> the point locations.
>
> POV-Ray (qtpovray 3.8) squawks with "Parse Error: Expected 'array initializer
> element', macro identifier found instead"
>
> Is this something we can't do?   Seemed weird.
>
> #declare Array =
> array mixed [2][5] {
>  {"text",    Macro(0.00, 0.90), ....

works, did same recently.  try putting the call into parentheses (force another
round of expr eval), ie:

array mixed [2][5] {
  {"text", (Macro(0.00, 0.90)), ....


regards, jr.


Post a reply to this message

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