Sintax error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Sintax error

894 次查看
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 项奖励
回复
2 回复数

864 次查看
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 项奖励
回复

864 次查看
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 项奖励
回复