Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!princeton!allegra!alice!ark From: ark@alice.UUCP Newsgroups: comp.lang.c Subject: Re: Problems with PRINTF, for some ungodly reason... Message-ID: <6924@alice.UUCP> Date: Tue, 26-May-87 12:17:06 EDT Article-I.D.: alice.6924 Posted: Tue May 26 12:17:06 1987 Date-Received: Thu, 28-May-87 02:36:07 EDT References: <7527@brl-adm.ARPA> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 11 Summary: you have to ask for floating-point in Lattice C In article <7527@brl-adm.ARPA>, DAVE%UWF.BITNET@wiscvm.wisc.EDU writes: > The problem is that both of the two printf's that try to output the variable > 'P' meet with disaster, in that both output the format spec, in this case, > the %lf, but I also tried %f, %g, and %G, mostly in desperation. How does > one output a (double) variable? There are two versions of printf distributed with Lattice C. One has floating-point formats build in and the other doesn't. If you intend to print floating-point values, you must ask for the right ones. Look, for instance at the LINKMS batch file. If I remember right you must include LCM.LIB and LC.LIB in that order when you link.