This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error C141 with Variables beginning with '$'

Hello,

I am using BankSwitching with XdataPort. In the BankSwitching Assembly file exists a public variable called '?B_CURRENTBANK'. I would like to access this variable from my C-program:

extern char ?B_CURRENTBANK;

void main(void)
{
char ucTest;
ucTest = ?B_CURRENTBANK;
}


The compiler gives me the following Error:
error C141: syntax error near '?'
.

Could somebody help me?

Thanks

Parents
  • '?' isn't a legal character for a 'C' identifier, is it...?!

    It is common for 'C' Compilers to do some "translation" between the identifiers in your source code and the symbols emitted to the object file; eg, adding an underscore prefix is common.
    This is described in the C51 Manual - look up "Naming Convention" or similar.

Reply
  • '?' isn't a legal character for a 'C' identifier, is it...?!

    It is common for 'C' Compilers to do some "translation" between the identifiers in your source code and the symbols emitted to the object file; eg, adding an underscore prefix is common.
    This is described in the C51 Manual - look up "Naming Convention" or similar.

Children
No data