home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!olivea!charnel!rat!ucselx!crash!orbit!pnet51!chucks
- From: chucks@pnet51.orb.mn.org (Erik Funkenbusch)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Stupid C question
- Message-ID: <8822@orbit.cts.com>
- Date: 28 Dec 92 08:25:02 GMT
- Sender: news@orbit.cts.com
- Organization: People-Net [pnet51], Minneapolis, MN.
- Lines: 16
-
- ad99s461@sycom.mi.org (Alex Deburie) writes:
- >However, I have one very stupid (simple?) question. HOW DOES ONE COVERT A
- >FLOATING POINT VALUE TO AN INTEGER???!!! I see functions like modf(), but
- >still that returns the integral part of the number as a float. And casting
- >seems to always return a 0!
-
-
- funny... this return 6 when i run it.
-
- void main(void) {
-
- printf ("%i\n", (int) 6.123);
-
- }
-
- I don't know why casting would return 0 for you..
-