home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sdd.hp.com!saimiri.primate.wisc.edu!caen!malgudi.oar.net!news.ysu.edu!psuvm!cunyvm!paacc
- Organization: City University of New York/ University Computer Center
- Date: Thursday, 7 Jan 1993 08:21:11 EST
- From: <PAACC@CUNYVM.BITNET>
- Message-ID: <93007.082111PAACC@CUNYVM.BITNET>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Stupid C question
- References: <ad99s461.037k@sycom.mi.org> <C01C2K.AxK@unx.sas.com>
- Lines: 20
-
- Couldn't you also just do a regular assign?
-
- main() {
- int i;
- float f;
-
-
- f = 5.679;
- i = f;
- printf(%f¢n%d¢n",f,i);
-
- }
-
- I haven't tried this but result should be
- 5.679 (with some trailing zeros)
- 5
-
- There are problems with negative numbers but it should work.
- Paul
-
-