POV-Ray : Newsgroups : povray.general : a simple question about File I/O : Re: a simple question about File I/O Server Time
4 Aug 2024 06:14:38 EDT (-0400)
  Re: a simple question about File I/O  
From: ABX
Date: 2 Jul 2003 02:17:09
Message: <5it4gv8jev6o6191jm5cs2b6pn21hut5om@4ax.com>
On Wed, 2 Jul 2003 10:30:53 +0800, "aaaz123456" <aaa### [at] yahoocomtw> wrote:
> I use the following loops to read data ,
> but get a error message,that is "Parse error : Expected ' undeclared
> indentifier' ,empty array found instead"
> Why?

Have you checked at which iteration it stops ? First ? Then before loops assign
value to any element of array to describe expected type of all array elements.
For example:

#local Array=array[N][M];
#local Array[0]0]=0;

Moreover you can introduce error checking inside loop:

   #ifdef(MyFile)
     #read(MyFile,Array[n][m])
   #else
     #error concat("Can't read element Array[",str(n,0,0),",",str(m,0,0),"]")
   #end


ABX


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.