Sintax error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sintax error

702 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andrei.badila on Tue Sep 18 11:41:40 MST 2012
I have a syntax error and I can not figure out why and how to correct it.
"if (invert)
    SPI_SendData(~0x00);
else
SPI_SendData(0x00);
for (line = 0; line < 52; line++) {
if (invert){
SPI_SendData(~Liberation_Sans17x17_Alpha[(c-0x41)*52+(line)]);// sintax error
}
else
{
SPI_SendData(Liberation_Sans17x17_Alpha[(c-0x41)*0x52+line]);//sintax eror
};
//0x20 is the ASCII character for Space (' '). The font table starts with this character
}
if (invert)
    SPI_SendData(~0x00);
else
SPI_SendData(0x00);
}"

DescriptionResourcePathLocationType
subscripted value is neither array nor pointerpcf8814.c/SolderStation/driverline 378C/C++ Problem
0 Kudos
Reply
2 Replies

672 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andrei.badila on Tue Sep 18 13:11:20 MST 2012
Thx I rezolv this


Quote: andrei.badila
I have a syntax error and I can not figure out why and how to correct it.
"if (invert)
    SPI_SendData(~0x00);
else
SPI_SendData(0x00);
for (line = 0; line < 52; line++) {
if (invert){
SPI_SendData(~Liberation_Sans17x17_Alpha[(c-0x41)*52+(line)]);// sintax error
}
else
{
SPI_SendData(Liberation_Sans17x17_Alpha[(c-0x41)*0x52+line]);//sintax eror
};
//0x20 is the ASCII character for Space (' '). The font table starts with this character
}
if (invert)
    SPI_SendData(~0x00);
else
SPI_SendData(0x00);
}"

DescriptionResourcePathLocationType
subscripted value is neither array nor pointerpcf8814.c/SolderStation/driverline 378C/C++ Problem

0 Kudos
Reply

672 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Tue Sep 18 11:54:50 MST 2012
Long ago when I last used C++...

Seems the error message refers to your item [FONT=Courier New]Liberation_Sans17x17_Alpha[/FONT], being supposedly not an array or a pointer.

Can you provide the declaration of this "array" - or whatsoever ?
Otherwise it's hard to judge.[IMG]http://knowledgebase.nxp.com/images/icons/icon12.gif[/IMG]
0 Kudos
Reply