Path: utzoo!attcan!uunet!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!lunic!my!luth!d87-khd From: d87-khd@sm.luth.se (Karl-Gunnar Hultland) Newsgroups: comp.sys.amiga.programmer Subject: Re: Amiga 3000, 2.0 and Lattice C Message-ID: <1419@tau.sm.luth.se> Date: 5 Feb 91 09:16:38 GMT References: <91031.171403FORDE@vm.poly.edu> <101060006@hpfcso.HP.COM> Organization: University of Lulea, Sweden Lines: 37 aoe@hpfcso.HP.COM (Alexander Elkins) writes: >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. >You'll be using the printf() defined in amiga.lib. That version doesn't handle >%f or %d and a number of other capabilities of the printf() we all know and >love to use. Use "#include " and >"fprintf(stdout,"%d %f:n",var1,var2);" to get the result you expect. Or just #include #undef printf Karl -- // // // \\ // // \\ // \\ // Karl Hultland,(d87-khd@sm.luth.se) \X/ \X/ \X/ University of Lulea,Sweden 500 2000 3000 I have called this principle, by which each slight variation, if useful, is preserved, by the term of Natural Selection. /C. Darwin