|
|
hi,
ingo <ing### [at] tagpovrayorg> wrote:
> Don't know the proper word for what I do, but the code below fails. Should
> it? Can it be made not to fail?
>
> #declare T = dictionary {
> ["Index"] : array[2]{"Base1", "Base2"},
> ["Base1"] : <1,2,3>,
> ["Base2"] : <0,1,2>
> };
>
> #declare Chain = T["Index"][0];
> #declare Vec = T.Chain;
>
> Parse Error: Cannot pass uninitialized identifier to non-optional LValue.
I don't suppose "the other way round" is any good to you? eg:
#version 3.8;
global_settings {assumed_gamma 1}
#declare T = dictionary {
.base0 : 0,
.base1 : 1,
.base2 : 2,
.vecs : array {<1,2,3>,<0,1,2>,<4,5,6>}
};
#debug concat("2) <",vstr(3,T.vecs[T.base2],",",0,0),">.\n")
regards, jr.
Post a reply to this message
|
|