home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!utcsri!geac!zooid!tndb!jimomura
- From: jimomura@tndb.UUCP (Jim Omura)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Stupid C question
- Distribution: world
- Message-ID: <jimomura.02ko@tndb.UUCP>
- References: <ad99s461.037k@sycom.mi.org>
- Date: 28 Dec 92 09:23:36 EST
- Organization: Not an Organization
- Lines: 18
-
- In article <ad99s461.037k@sycom.mi.org> ad99s461@sycom.mi.org (Alex Deburie) writes:
- >Okay, I've had SAS-C 6.0 for about 2 weeks and I'm very pleased. Between GST's
- >and the Workbench interface, I doubt I could ask for a better introduction to
- >C on the Amiga.
- >
- >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!
-
- "Casting" is the way to do it. Post a short example of how
- you're going about the cast. It could be a compiler bug, but it's
- more likely something to do with how you're casting.
-
- --
-
- Jim Omura, (416) 652-3880
- 'jimomura@lsuc'
-