|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
Am I a (few) version(s) behind?
(Windows)
version 3.8.0-alpha.9606898.blahblahblah
Thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"Bald Eagle" <cre### [at] netscapenet> wrote:
> 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.
>
should work if you get rid of the initial dimension, ie
#local ToothPrismArray = array;
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> should work if you get rid of the initial dimension, ie
>
> #local ToothPrismArray = array;
I commented that out, and now
#local ToothPrismArray [0] = <_RC, _RC>;
gives me "Expected '=', [ found instead.
Is there a simple, easy link to download just the latest 64-bit executable file?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Just went to:
https://github.com/POV-Ray/povray/releases
Downloaded
Development build v3.8.0-alpha.9893777+av622
un7-zipped the file, renamed the old exe, copied over the new, ran it, checked
the version number in "about", and still have the same problem(s)trying to
render the scene.
So, It's not the version - I'm doing something wrong.
I even tried
#ifndef (ToothPrismArray [1]) #end
right before that, and got an error even trying to check if that array element
was defined. :(
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
http://news.povray.org/povray.general/message/%3C5b540d5e%241%40news.povray.org%3E/#%3C5b540d5e%241%40news.povray.org%3
E
#declare Foo = array;
This will create a resizable array with an initial size of zero, and
then grow the array...
So, it seems that ANY array is not resizable, only specially created arrays.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 03.11.2018 um 00:26 schrieb Bald Eagle:
> "jr" <cre### [at] gmailcom> wrote:
>
>> should work if you get rid of the initial dimension, ie
>>
>> #local ToothPrismArray = array;
>
>
> I commented that out, and now
>
> #local ToothPrismArray [0] = <_RC, _RC>;
>
> gives me "Expected '=', [ found instead.
Make sure you have NOT un-commented the semicolon.
Without the semicolon, POV-Ray will continue scanning for an opening
square bracket. The next `#local` is /not/ sufficient for POV-Ray to
recognize that you're done declaring the array; instead, POV-Ray will
just postpone parsing the array declaration, expecting it to be
continued after the second `#local`. So you'll end up with an attempt to
assign an array element before the array even exists, and POV-Ray gets
all confused.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 03.11.2018 um 14:31 schrieb clipka:
> Make sure you have NOT un-commented the semicolon.
I meant to write "NOT commented out" of course.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |