Liste des Groupes | Revenir à cl forth |
...
BTW, the standard (section A.12.3.7, A.12.6.1.0558, 12.3.7) requires the trailing E.
As far as the embedded decimal point goes:
"The Technical Committee has more than once received the suggestion that the text interpreter in Standard Forth systems should treat numbers that have an embedded decimal point, but no exponent, as floating-point numbers rather than double cell numbers. This suggestion, although it has merit, has always been voted down because it would break too much existing code; many existing implementations put the full digit string on the stack as a double number and use other means to inform the application of the location of the decimal point."
In short: !!WE DON'T WANNA BREAK EXISTING CODE!!
On the other hand, "TC reply to Q0004":
Q: Will a number with an *embedded* decimal point be converted to a double-cell number in a Standard Forth system?
A: Not necessarily. A Standard System is permitted, *but not required,* to convert digit strings with embedded periods as double numbers. Consequently, a Standard Program cannot rely on any particular interpretation of such digit strings.
Les messages affichés proviennent d'usenet.