|
|
Wasn't it aaaz123456 who 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?
>Thanks a lot .
>
>> #local N=3; // fill with
>> #local M=3; // favorite dimensions
>> #local Array=array[N][M];
>> #fopen MyFile "myfile.txt" read
>> #local n=0;
>> #while (n<N)
>> #local m=0;
>> #while (m<M)
>> #read(MyFile,Array[n][m])
>> #local m=m+1;
>> #end
>> #local n=n+1;
>> #end
>> #fclose MyFile
>>
Add this line before the loop and it works
#local Array[0][0] = 0;
It looks like #read is failing to instantiate the array, so you have to
do it yourself first.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|