Article View: comp.lang.modula2
Article #4149Re: Modula2's godawful IO.
From: BRUCE SZABLAK
Date: Thu, 07 Apr 1988 21:31
Date: Thu, 07 Apr 1988 21:31
11 lines
1070 bytes
1070 bytes
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; The advantage of this approach over using procedures in modula2 or pascal is (besides previty) that you don't have to remember the type of structure your variable is; the compiler figures it out.
Technical Details
Message-ID:
<96@lzaz.ATT.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ll-xn!oberon!sdcrdcf!ucla-cs!rutgers!mtunx!lzaz!bdsReferences:
<764@ndsuvax.UUCP> <535@m10ux.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ll-xn!oberon!sdcrdcf!ucla-cs!rutgers!mtunx!lzaz!bds From: bds@lzaz.ATT.COM (BRUCE SZABLAK) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Re: Modula2's godawful IO. Message-ID: <96@lzaz.ATT.COM> Date: 7 Apr 88 21:31:00 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> Organization: AT&T ISL Middletown NJ USA Lines: 11 Summary: C++ even better