home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17865 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  1.1 KB

  1. Path: sparky!uunet!utcsri!geac!zooid!tndb!jimomura
  2. From: jimomura@tndb.UUCP (Jim Omura)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Stupid C question
  5. Distribution: world
  6. Message-ID: <jimomura.02ko@tndb.UUCP>
  7. References:  <ad99s461.037k@sycom.mi.org>
  8. Date: 28 Dec 92 09:23:36 EST
  9. Organization: Not an Organization
  10. Lines: 18
  11.  
  12. In article <ad99s461.037k@sycom.mi.org> ad99s461@sycom.mi.org (Alex Deburie) writes:
  13. >Okay, I've had SAS-C 6.0 for about 2 weeks and I'm very pleased. Between GST's 
  14. >and the Workbench interface, I doubt I could ask for a better introduction to 
  15. >C on the Amiga.
  16. >
  17. >However, I have one very stupid (simple?) question. HOW DOES ONE COVERT A 
  18. >FLOATING POINT VALUE TO AN INTEGER???!!!  I see functions like modf(), but 
  19. >still that returns the integral part of the number as a float. And casting 
  20. >seems to always return a 0!
  21.  
  22.      "Casting" is the way to do it.  Post a short example of how
  23. you're going about the cast.  It could be a compiler bug, but it's
  24. more likely something to do with how you're casting.
  25.  
  26. --
  27.  
  28. Jim Omura, (416) 652-3880
  29. 'jimomura@lsuc'
  30.