home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18281 < prev    next >
Encoding:
Text File  |  1993-01-07  |  723 b   |  31 lines

  1. Path: sparky!uunet!usc!sdd.hp.com!saimiri.primate.wisc.edu!caen!malgudi.oar.net!news.ysu.edu!psuvm!cunyvm!paacc
  2. Organization: City University of New York/ University Computer Center
  3. Date: Thursday, 7 Jan 1993 08:21:11 EST
  4. From: <PAACC@CUNYVM.BITNET>
  5. Message-ID: <93007.082111PAACC@CUNYVM.BITNET>
  6. Newsgroups: comp.sys.amiga.programmer
  7. Subject: Re: Stupid C question
  8. References: <ad99s461.037k@sycom.mi.org> <C01C2K.AxK@unx.sas.com>
  9. Lines: 20
  10.  
  11.  Couldn't you also just do a regular assign?
  12.  
  13.  main() {
  14.    int i;
  15.    float f;
  16.  
  17.  
  18.    f = 5.679;
  19.    i = f;
  20.    printf(%f¢n%d¢n",f,i);
  21.  
  22. }
  23.  
  24.  I haven't tried this but result should be
  25. 5.679 (with some trailing zeros)
  26. 5
  27.  
  28.  There are problems with negative numbers but it should work.
  29. Paul
  30.  
  31.