Modula2's godawful IO.

Duke Robillard rgr at m10ux.UUCP
Sun Apr 17 08:33:19 AEST 1988


In article <6366 at watdragon.waterloo.edu] gjditchfield at violet.waterloo.edu (Glen Ditchfield) writes:
]In article <547 at m10ux.UUCP] rgr at m10ux.UUCP (Duke Robillard) writes:
]]In article <96 at lzaz.ATT.COM] bds at 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 at ihnp4.UUCP                 
|       Murray Hill, NJ          {any biggy}!ihnp4!m10ux!rgr



More information about the Comp.lang.c mailing list