| ARM Technical Support Knowledge Articles | |
Applies to: C251 C Compiler
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.
Article last edited on: 2005-07-19 10:06:39
Did you find this article helpful? Yes No
How can we improve this article?