|
|
Next scene gives an error "Expected 'undeclared identifier', empty array
found instead" when I try to render it. Aren't A[0] and A[1] undeclared
identifiers and shouldn't Pov-Ray turn them "into global identifiers of
the type determined by the data which is read". If I uncomment the
commented line, it works. What am I missing here and how should I
correct the code to make it work?
PS. Don't forget to delete the test.dat this scene creates...
Severi S.
-----------------------
#declare A = array[2];
//#declare A[0]=0;
#fopen P_File "test.dat" write
#write (P_File, 1,",",2)
#fclose P_File
#fopen P_File "test.dat" read
#read (P_File, A[0],A[1])
#fclose P_File
Post a reply to this message
|
|
|
|
Severi Salminen <sev### [at] NOT_THISsibafi> wrote in message
news:404f1316$1@news.povray.org...
> Next scene gives an error "Expected 'undeclared identifier', empty array
> found instead" when I try to render it. Aren't A[0] and A[1] undeclared
> identifiers and shouldn't Pov-Ray turn them "into global identifiers of
> the type determined by the data which is read".
<snip>
But A[0] & A[1] are declared...
> #declare A = array[2];
And since it is uninitialized, the error is correct.
Try
#fopen P_File "test.dat" read
#read (P_File, A0,A1)
#declare A[0] = A0;
#declare A[1] = A1;
#fclose P_File
RG
Post a reply to this message
|
|