Keil™, An ARM® Company

Technical Support

A51: ERROR 1 (ILLEGAL CHARACTERS IN NUMERIC CONSTANT)


Information in this article applies to:

  • C251 Version 2.14
  • C51 Version 5.50

QUESTION

When I assemble my 8051/80251 assembly source file, I get the following diagnostic:

ERROR 1: ILLEGAL CHARACTER IN NUMERIC CONSTANT

ANSWER

This error indicates that an invalid character was found in a numeric constant. Numeric constants must begin with a decimal digit and are delimited by the first non-numeric character (with the exception of the dollar sign). The base of the number decides which characters are valid.

  • Base 2: 0,1 and the base indicator B
  • Base 8: 0-7 and the base indicator O or Q
  • Base 10: 0-9 and the base indicator D or no indicator
  • Base 16: 0-9, A-F and the base indicator H
  • Base 16: 0xhhhh, 0-9, and A-F

MORE INFORMATION

  • Refer to Error A1 in the Ax51 User's Guide.

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure