Xref: utzoo comp.lang.modula2:764 comp.lang.misc:1421 comp.lang.c:9209 comp.lang.pascal:798 Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!mailrus!umix!umich!mibte!gamma!ulysses!mhuxo!mhuxu!mhuxi!mhuxh!mhuxt!m10ux!rgr From: rgr@m10ux.UUCP (Duke Robillard) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Re: Modula2's godawful IO. Message-ID: <547@m10ux.UUCP> Date: 12 Apr 88 01:58:23 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> <96@lzaz.ATT.COM> Reply-To: rgr@m10ux.UUCP (Duke Robillard) Organization: AT&T Bell Labs, Murray Hill Lines: 20 In article <96@lzaz.ATT.COM> bds@lzaz.ATT.COM (BRUCE SZABLAK) writes: >In article <535@m10ux.UUCP>, rgr@m10ux.UUCP (Duke Robillard) writes: >> I hate C as much as the next guy, but it seems to me that printf is >> the solution. > >I like C++'s overloading of the << and >> operator's even better than >printf. It allows you to define custom print routines for each structure >(class) declared, and then to print (to stdout for example) you do: > cout << god_awful_structure_instance; Yeah, but that doesn't help me print out an error message, two strings, and an integer return code. I don't want to have to write a method for every print.... -- + | Duke Robillard | AT&T Bell Labs m10ux!rgr@ihnp4.UUCP | Murray Hill, NJ {any biggy}!ihnp4!m10ux!rgr