Xref: utzoo comp.lang.modula2:763 comp.lang.misc:1420 comp.lang.c:9208 comp.lang.pascal:797 Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!mailrus!umix!umich!mibte!gamma!ulysses!mhuxo!mhuxu!mhuxi!mhuxd!mhuxm!gak From: gak@mhuxm.UUCP (Vincent Hatem) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Re: Modula2's godawful IO. Message-ID: <730@mhuxm.UUCP> Date: 11 Apr 88 15:42:43 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 42 Summary: do it right! In article <535@m10ux.UUCP>, rgr@m10ux.UUCP (Duke Robillard) writes: > In article <764@ndsuvax.UUCP> ncreed@ndsuvax.UUCP (Walter Reed) writes: > >Here is an example of why these things bother me. > > IF (x = TRUE) THEN > > WriteString("Error #"); > > WriteCard(e); > > WriteString(" in line #"); > > WriteCard(l); > > WriteString(" detected."); > : > : > the solution. Has anyone ever written some kind of front end for a > modula compiler to turn printf's into WriteSh*t's? It doesn't seem > : > | Duke Robillard > | AT&T Bell Labs m10ux!rgr@ihnp4.UUCP > | Murray Hill, NJ {any biggy}!ihnp4!m10ux!rgr Come on... give me a break. If you don't like the I/O subsystem, why don't you re-write it??? A front-end translator in m4 is silly. Besides, the whole idea of the WriteCard()-style I/O system is to remove the 20K overhead that printf() adds to programs. 95% of the functionality of printf() is never used, and you're just making your text segment larger. I've worked on a replacement for printf() in Modula-2 which allowed most of the basic formatting of numbers/strings which are used regularly. It also allowed for OOP Object I/O function definitions, which allow you to tell it to Write an Object with the functionality of a c++ construct such as this: cout << some_object_instance; I'd post it, but it is based on a new I/O system (which I also worked on), which is incompatible with Wirth's I/O system. (there used to be talk of making the library we wrote Freeware, but I haven't seen it yet...) -- Vincent Hatem AT&T International, International Systems Operations, UNIX Technical Support Telefon: (201) 953-8030 Please send all e-mail to: ihnp4!atti01!vch