🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1252

Re: Lessons from Algol (Was: JLG's flogging of horses)

#1252
From: Peter da Silva
Date: Thu, 03 May 1990 13:20
31 lines
1905 bytes
> (Of course, if one really wants adequate I/O facilities, one must look at
> Cobol, PL/1, or Fortran.)

Fortran? Adequate I/O facilities? Well, I must admit that Fortran I/O has
lots of *features*, but how do you do:

	printf("The answer is %d, not %d\n", ans, resp);

in Fortran? The best I can come up with on the top of my head is something
like:

	WRITE (BUFFER,100) PRINTLENGTH(ANS),PRINTLENGTH(RESP)
 100	FORMAT('(''The answer is '',',I1,'I,'',not '',',I1,'I'')')
	WRITE (5,BUFFER) ANS,RESP

One time I actually went to the trouble of implementing printf in Fortran to
make free-form output easier for one application.

> I agree that the ability to define pointers to functions is an advantage
> of C over Pascal and Ada. Otherwise C's type structure is inferior,
> even disregarding the counterintuitive syntax of type definitions.

What counterintuitive syntax? Declare them as you use them. The
counterintuitive part comes from the fact that indirection is prefix
rather than postfix. If you want to slam C for something, at least
slam the right thing!
-- 
 _--_|\  `-_-' Peter da Silva. +1 713 274 5180.      <peter@ficc.uu.net>
/      \  'U`  Have you hugged your wolf today?  <peter@sugar.hackercorp.com>
\_.--._/       Disclaimer: commercial solicitation by email to this address
      v                    is acceptable.
Technical Details
Message-ID: <N+63FGBggpc2@ficc.uu.net>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!wuarchive!texbell!ficc!peter
References: <1990Apr19.180903.27750@maths.nott.ac.uk> <4277@tukki.jyu.fi> <1990Apr27.171252.9503@maths.nott.ac.uk> <4403@tukki.jyu.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!wuarchive!texbell!ficc!peter
From: peter@ficc.uu.net (Peter da Silva)
Newsgroups: comp.lang.misc
Subject: Re: Lessons from Algol (Was: JLG's flogging of horses)
Message-ID: <N+63FGBggpc2@ficc.uu.net>
Date: 3 May 90 13:20:29 GMT
References: <1990Apr19.180903.27750@maths.nott.ac.uk> <4277@tukki.jyu.fi> <1990Apr27.171252.9503@maths.nott.ac.uk> <4403@tukki.jyu.fi>
Reply-To: peter@ficc.uu.net (Peter da Silva)
Organization: Xenix Support, FICC
Lines: 26