🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4186

Re: Modula2's godawful IO.

#4186
From: Duke Robillard
Date: Sat, 16 Apr 1988 22:33
31 lines
1761 bytes
In article <6366@watdragon.waterloo.edu] gjditchfield@violet.waterloo.edu (Glen Ditchfield) writes:
]In article <547@m10ux.UUCP] rgr@m10ux.UUCP (Duke Robillard) writes:
]]In article <96@lzaz.ATT.COM] bds@lzaz.ATT.COM (BRUCE SZABLAK) writes:

]]]	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....
]
]Neither would I.  Fortunately for us, the i/o operators can be chained.
]	cout << "Error: file " << fname << ", line " << lnum
]	     << error_msg << "\n";

    This is cool.  The syntax is a little bulky (how un-C-like) but
overall it looks good.

]I think this is a big improvement over calls to overloaded "Print" 
]procedures.

    However, I don't really see that this is any different than 
overloading a print procedure.  all you're doing is overloading "<<"
(i.e. making it handle strings, integers, reals, whatever), right?



-- 
+                                
|       Duke Robillard
|       AT&T Bell Labs           m10ux!rgr@ihnp4.UUCP                 
|       Murray Hill, NJ          {any biggy}!ihnp4!m10ux!rgr
Technical Details
Message-ID: <553@m10ux.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!rutgers!mtunx!whuts!homxb!mhuxt!m10ux!rgr
References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> <96@lzaz.ATT.COM> <547@m10ux.UUCP> <6366@watdragon.waterloo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!rutgers!mtunx!whuts!homxb!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: <553@m10ux.UUCP>
Date: 16 Apr 88 22:33:19 GMT
References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> <96@lzaz.ATT.COM> <547@m10ux.UUCP> <6366@watdragon.waterloo.edu>
Reply-To: rgr@m10ux.UUCP (Duke Robillard)
Organization: AT&T Bell Labs, Murray Hill
Lines: 29