I have a header file nxcio.h
Code: Select all
int LCDline[8]={56,48,40,32,24,16,8,0};
#define printf2( _x, _y, _format1, _format2, _value1, _value2) { \
string sval1 = FormatNum(_format1, _value1); \
string sval2 = FormatNum(_format2, _value2); \
string s =sval1+sval2; \
TextOut(_x, _y, s); \
}
G:\Akten\Programmierung\NXC\include
(this path is set in preferences as include path)
and a test file
Code: Select all
#include "nxcio.h"
task main(){
for (int i=0;i<8;i++) {
printf2(0,LCDline[i],"%3d","%3d", i, (i+2)&14);
}
while (true);
}
G:\Akten\Programmierung\NXC\Test
If I press F5 I get no error,
but if I press ctrl+F5 I get the error
# Error: Undefined Identifier LCDline
File "c:\Temp\temp.nxc" ; line 10
# TextOut(0, LCDline[
#----------------------------------------------------------
# Error: Unknown datatype
File "c:\Temp\temp.nxc" ; line 10
# TextOut(0, LCDline,
#----------------------------------------------------------
# Error: Unknown datatype
File "c:\Temp\temp.nxc" ; line 11
#
what's wrong?