ARM Technical Support Knowledge Articles

CONSTANT FLOATING POINT NUMBER '0E'

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

It appears that I can use '0E' in my source code and it always evaluates to zero. What is '0E' and why is it zero?

ANSWER

'0E' is the floating point number zero, and should be written as 0E0. A bug in the compiler results in '0E' being accepted as well as 0E0. This will be fixed in future versions.

Use 0E0 in your code and this will ensure compatibility with future compilers.

MORE INFORMATION

Refer to the ANSI C Standard, section 6.1.3.1 Floating Constants for more information on the components of a floating point constant.

SEE ALSO

Article last edited on: 2005-07-19 10:22:52

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential