From: Martin Ambuhl Newsgroups: comp.os.msdos.djgpp Subject: Re: float is not working Date: Thu, 15 Apr 1999 04:21:01 -0400 Content-Transfer-Encoding: 7bit References: <3714C932 DOT 1E5E452B AT spektracom DOT de> X-Posted-Path-Was: not-for-mail X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-ELN-Date: 15 Apr 1999 08:35:08 GMT X-ELN-Insert-Date: Thu Apr 15 01:45:04 1999 Organization: Nocturnal Aviation Lines: 17 Mime-Version: 1.0 NNTP-Posting-Host: 1cust132.tnt12.nyc3.da.uu.net Message-ID: <3715A16D.73127311@earthlink.net> X-Mailer: Mozilla 4.51 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Andrej Aderhold wrote: > > why is this not working ?? > > float m = 1 / 2; > > (m will be 0) Then it's working. If you don't want integer division, try float m = 1./2; or float m = 0.5; -- Martin Ambuhl (mambuhl AT earthlink DOT net) Note: mambuhl AT tiac DOT net will soon be inactive