[NXC][BUG]OpenFileRead string array bug
Posted: 18 Mar 2011, 08:02
With the following code, I get a NBC (not NXC) compiler error
The error is
Line 7 is the line with OpenFileRead, the filename parameter is MyStringArray[2] which should be "123.txt"
How do you get the NBC when it dosen't compile?
Thanks,
Tim
Code: Select all
task main()
{
string MyStringArray[] = {"abc.txt","123.txt","lifeuniverse_etc.txt","NXCisgr8.txt"};
NumOut(0,LCD_LINE1,MyStringArray[1]);
int fsize;
byte handle;
OpenFileRead(MyStringArray[2],fsize,handle); // is this a bug??????
CloseFile(handle);
}
Code: Select all
# Error: Error parsing expression: __main_7qG2_MyStringArray_7qG2_000[2]
File "C:\Documents and Settings\pattinsont\Desktop\NXC\bug.nxc" ; line 7
#
#----------------------------------------------------------
1 errors during compilation
How do you get the NBC when it dosen't compile?
Thanks,
Tim