|
|
Am 13.09.2018 um 02:42 schrieb Mike Horvath:
> I am trying to define an array like this:
>
> #declare MeanAnomalyToday = array[8]
> {
> CalcMeanAnomalyToday(0),
> CalcMeanAnomalyToday(1),
> CalcMeanAnomalyToday(2),
> CalcMeanAnomalyToday(3),
> CalcMeanAnomalyToday(4),
> CalcMeanAnomalyToday(5),
> CalcMeanAnomalyToday(6),
> CalcMeanAnomalyToday(7)
> }
>
> The macro "CalcMeanAnomalyToday" returns a number.
>
> #macro CalcMeanAnomalyToday(i)
> 2 * i
> #end
>
> I get an error, "Parse Error: Expected 'array initializer element',
> macro identifier found instead".
>
> What am I doing incorrectly? Thanks.
In a nutshell, POV-Ray doesn't like anything fancy in array initializers
- no macros, no #for loops, no #if statements, no nothing.
That's a long-standing featuroid, which a certain previous member of the
dev team would probably dismiss as entirely intentional; I for one would
call it a shortcoming that /should/ be fixed, but I'd rather not touch
the professional-league Jenga tower of code in which this issue is rooted.
https://youtu.be/7erl-bOWmOM
Post a reply to this message
|
|