Xref: utzoo comp.lang.modula2:806 comp.lang.misc:1483 comp.lang.c:9536 comp.lang.pascal:832 Path: utzoo!mnetor!uunet!vsi!friedl From: friedl@vsi.UUCP (Stephen J. Friedl) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Re: Modula2's godawful IO. Message-ID: <588@vsi.UUCP> Date: 22 Apr 88 02:50:02 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> <730@mhuxm.UUCP> <11154@mimsy.UUCP> Organization: V-Systems, Inc. -- Santa Ana, CA Lines: 22 Summary: floating point 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. [....] > > [*]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. This brings up an interesting question. The C compiler on the Onyx Z8000 (R.I.P.) would generate a symbol "_fltused" if any floating point of any kind was used in that particular module. When the linker went to resolve everything, it loaded in the floating-point emulator if this symbol was found and didn't if it wasn't. As far as I could tell, this symbol was nothing more than a indicator to ld(1). Does anybody else do this? It seems so much more reasonable than the ubiquitous "-f" flag. -- Steve Friedl V-Systems, Inc. Resident access(2) basher friedl@vsi.com {backbones}!vsi.com!friedl attmail!vsi!friedl