Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!msuinfo!convex.cl.msu.edu!jap From: jap@convex.cl.msu.edu (Joe Porkka) Newsgroups: comp.sys.amiga.programmer Subject: Re: Amiga 3000, 2.0 and Lattice C Message-ID: <1991Feb6.035514.10685@msuinfo.cl.msu.edu> Date: 6 Feb 91 03:55:14 GMT References: <91031.171403FORDE@vm.poly.edu> <18a2c651.ARN12e8@pilhuhn.ka.sub.org> Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 24 hwr@pilhuhn.ka.sub.org (Heiko W.Rupp) writes: >Organization: Not an Organization >In article <91031.171403FORDE@vm.poly.edu>, FORDE@vm.poly.edu writes: >> >> int var1=1; >> float var2=2.3; >> >> printf("%d %f:n",var1,var2); >> >> results in: >> >> 1 %f >> >>Can anyone tell me why this is happening. I'm using Lattice C 5.10. >I don't know much about SAS C (I'm using Atzec 3.6a), but you should >explicitly link with the math library before standard C-library (amiga.lib). Since the "%f" gets printed, the problem is more likly that you are linking AMIGA.LIB before lc.lib. There is a "printf()" defined in amiga.lib but it does not understand floats. So... link with lc.lib then amiga.lib.