|
|
Am 02.11.2018 um 23:41 schrieb Bald Eagle:
> Hi all,
>
> I was restructuring some code, and wanted to take advantage of using the new
> array features.
>
> #local ToothPrismArray = array [1];
>
> #local ToothPrismArray [0] = <_RC, _RC>;
> #local ToothPrismArray [1] = RotatePoint (<_RC, 0>, -_HT);
> #local ToothPrismArray [2] = RotatePoint (<_RB, 0>, -_HT);
>
> When I get to the second line of element definitions, I get the old "Array
> subscript out of range" error.
>
> Is there a trick to this?
Yes. The normal arrays are still fixed; you need to declare the array
differently:
#local ToothProsmArray = array;
Note the absence of any dimensions. This declares a one-dimensional
variable-sized array.
Before anyone asks, multi-dimensional variable-sized arrays are not
supported.
Post a reply to this message
|
|