| 
Skiba <abx### [at] babilon org>  wrote:
> I tried to make shorter version of f_array problem script for Warp but
> accidentaly I found another thing:
>
> #declare IC_Arr=array[12]
> #declare IC_Arr[0]=function{x}
> #declare IC_Arr[1]=IC_Arr[0]
> #declare IC_Arr[2]=IC_Arr[1]
>
> returns :
>
> #declare IC_Arr[1]=IC_Arr[0]
> #declare IC_Arr[2]=IC_Arr[1] <----ERROR
> Parse Error: Attempt to access uninitialized array element.
>
> Any confirmation ?
Add semicolons and it works.  The semicolons are required but the parser
cannot detect the end of the third declare line:
 #declare IC_Arr=array[12]
 #declare IC_Arr[0]=function{x}
 #declare IC_Arr[1]=IC_Arr[0];
 #declare IC_Arr[2]=IC_Arr[1]
Gives the correct error message.
 #declare IC_Arr=array[12]
 #declare IC_Arr[0]=function{x}
 #declare IC_Arr[1]=IC_Arr[0];
 #declare IC_Arr[2]=IC_Arr[1];
Gives the correct result.
    Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf  de
Visit POV-Ray on the web: http://mac.povray.org Post a reply to this message
 |