Mail Archives: djgpp/1998/10/16/09:50:49
Nicolas Blais wrote:
> Let's say I do this: const float version_of_game = 1.1;
> When I do this : cprintf("The version: %f\n\r", version_of_game);
Version number isn't really a number. It's a string, a code
actually. This is clear when you use RCS, where you can create
version "numbers" with multiple decimal points. Hence gcc v2.8.1 and
similar constructions. Also realize that the version after 1.9 is
1.10, not 2.0. 2.0 implies a much larger change than 1.10 does.
If you insist on making it a number, keep in mind that you'll
eventually reach numbers without exact binary representations. These
will not always be rounded in the way you expect.
Charles
- Raw text -