OFF-TOPIC: Algol 60 guru required

Les hlhowell at pacbell.net
Tue Aug 4 19:03:44 UTC 2009


On Mon, 2009-08-03 at 19:42 -0400, Kevin J. Cummings wrote:
> On 08/03/2009 05:58 PM, Hiisi wrote:
> > Dear All!
> > Sorry for this off-topic, but I could not see any solution to my
> > problem. I'm trying to transform old Algol 60 program to C++. I can
> > understand every syntax of it except this construction:
> > D(N+1):=N(N+2):=0.0;
> > 
> > Variables types:
> > N - INTEGER
> > D - REAL ARRAY
> > What is it? How to represent in C++? Hope on this list there's people,
> > who could remember that from the time...
> > Thanks in advance!
> 
> Classic ALGOL-60 requires that a subscript-list be enclosed in square
> brackets.  I would expect your statement should read:
> 
> D[N+1]:=N[N+2]:=0.0;
> 
> But this doesn't answer the question of N.  Is it an INTEGER scalar?
> INTEGER array?  INTEGER procedure?  Its the N(N+2) part that bothers me.
> 
> The actual definitions of D and N would help here.
> 
> An assignment statement is defined as:
> 
> <left-part-list><expression>
> 
> and a left-part-list is one or more
> 
> <variable> :=
> 
> where each variable in the <left-part-list> receives the value of the
> <expression>.
> 
> BTW, I'm just curious how you're handling the "pass by name" stuff....
> 
> > -- 
> > Hiisi.
> > Registered Linux User #487982. Be counted at: http://counter.li.org/
> > 
> 
> 
> -- 
> Kevin J. Cummings
> kjchome at rcn.com
> cummings at kjchome.homeip.net
> cummings at kjc386.framingham.ma.us
> Registered Linux User #1232 (http://counter.li.org)
> 

I don't know if many folks these days are familiar with the "pass by
name" operation.  Such code these days is generally not implemented due
to the MANY serious issues with security, and most languages don't have
any implementation for it (other than some runtime object language
approximations using overloading to approximate it), and some list
processing languages like Clisp.  

	Anyway for the uninitiated, here is a fair explanation of how it works:

http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html

	I was going to write a C example, but I am just too rusty in Algol to
be sure I coded it correctly.  However, the Thunk method as shown using
PASCAL is one method of implementing pass by value.

Regards,
Les H





More information about the fedora-list mailing list