|
 |
On 9/23/18 1:53 PM, clipka wrote:
> Contrary to earlier claims, intentions, the documentation already on the
> Wiki, and my own clouded memory, the restriction that array elements
> have to be of the same type has /not/ been removed.
>
> While I could fix this, I have decided not to, as same-type arrays are
> clearly the default use case, and it may actually be helpful to get an
> early error message when accidently assigning a value of a mismatching
> type to one element.
>
> Instead, the behaviour will be changed as follows:
>
>
> In an array declaration, the `array` keyword may be followed by the
> `mixed` keyword. This declares the array as a /mixed-type array/,
> allowing it to hold elements of different types.
>
> Example:
>
> #declare Foo = array mixed[3];
> #declare Foo[0] = 42;
> #declare Foo[1] = "Fnord";
> #declare Foo[2] = sphere { <0,0,0>, 1 }
>
done: http://wiki.povray.org/content/Reference:Array
Post a reply to this message
|
 |