Xref: utzoo comp.lang.modula2:815 comp.lang.misc:1495 comp.lang.c:9629 comp.lang.pascal:837 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!oodis01!uplherc!sp7040!obie!wes From: wes@obie.UUCP (Barnacle Wes) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Flaming printf (was: Re: Modula2's godawful IO.) Message-ID: <173@obie.UUCP> Date: 24 Apr 88 20:39:51 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> <730@mhuxm.UUCP> <11154@mimsy.UUCP> Organization: the Well of Souls Lines: 23 Summary: MWC has two versions of printf In article <11154@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: % It is not difficult[*] to arrange for the linker to pull in a simple % printf() if the rest of the program does not use floating point, and a % full-blown floating point printf if it does. Just because Microsoft's % implementation is poor (in terms of space, at any rate) is no reason to % castigate printf itself. % % ----- % [*]What, never? Well, hardly ever. The trick is to have the linker % examine the undefined externals for floating-point library references, % and if present, link with `bigprintf.obj'; otherwise it should use % `littleprintf.obj'. It is just a Small Matter of Programming. The Mark Williams C compiler for the Atari ST sort of supports this idea. The printf library function does not ordinarily include floating point routines. If you specify the -f flag to the compiler, the larger version of printf (with floating i/o) will be linked instead. Not quite as elegant was what Chris proposed, but really quite functional. -- /\ - "Against Stupidity, - {backbones}! /\/\ . /\ - The Gods Themselves - utah-cs!uplherc! / \/ \/\/ \ - Contend in Vain." - sp7040!obie! / U i n T e c h \ - Schiller - wes