From: Charles Krug Newsgroups: comp.os.msdos.djgpp Subject: Re: Float question... Date: Fri, 16 Oct 1998 09:43:57 -0400 Organization: Pentek Corporation Lines: 18 Message-ID: <36274D9D.2C0FEDAF@mail.pentek.com> References: <3620BFD1 DOT 32265FF4 AT netrover DOT com> NNTP-Posting-Host: mail.pentek.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (WinNT; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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