C251: SYNTAX ERROR WHEN DECLARING A VARIABLE
Information in this article applies to:
I am porting a program from the 8051 to the 251 and I have a variable declared using:
const code int x;
However, the compiler gives the following error:
Error 25: syntax error near 'int'
Changing 'code' to 'near' or 'far' gives the same result.
When declaring a variable using the C251 compiler, you must specify the variable type before the memory space.
Change your variable declaration to:
const int code x;
Refer to pages 96 and 97 in the C251 Compiler User's Guide (09.97) for further information on explicitly declared memory types and examples of variable declaration with memory type.
Last Reviewed: Tuesday, July 19, 2005
of your data.