OFF-TOPIC: Algol 60 guru required

Hiisi very-cool at rambler.ru
Tue Aug 4 06:28:09 UTC 2009


> From: "Kevin J. Cummings" <cummings at kjchome.homeip.net>
>
> 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>.

First of all, thanks everybody for your responses.
Here's a fragment of the initial code:
PROCEDURE QUINEQ(INTEGER VALUE N1,N2; REAL ARRAY Y,B,C,D,E,F(*));
   IF N2>N1+1 THEN
   BEGIN
      INTEGER N;
      REAL P,Q,R,S,T,U,V;
      N:=N2-3;  P:=Q:=R:=S:=T:=0.0;
      FOR I:=N1 STEP 1 UNTIL N DO
      BEGIN
         U:=P*R;  B(I):=1.0/(66.0-U*R-Q);
         C(I):=R:=26.0-U;
         D(I):=Y(I+3)-3.0*(Y(I+2)-Y(I+1))-Y(I)-U*S-Q*T;
         Q:=P;  P:=B(I);  T:=S;  S:=D(I)
      END I;
      D(N+1):=N(N+2):=0.0;
And quotation from paper (year of publication: 1976), that describes the 
algorithm: "These procedures have been tested in Algol 60 on the 
Telefunken TR-440 computer
at the Leibniz-Rechenzentrum of the Bavarian Academy of Sciences, 
Munich, and
in Algol W on the I B M 360/67 at the Stanford Center for Information 
Processing."
It's accessible here: 
http://portal.acm.org/citation.cfm?id=355694.355701

>
> BTW, I'm just curious how you're handling the "pass by name" stuff....
>
I had little problem with modification of it. I just auto-replaced 
'PROCEDURE' to 'void', 'BEGIN' to '{', and so on. Then I had only to 
change by hand FOR and IF-constructions, that is:
FOR I:=N STEP -1 UNTIL N1 DO
IF N2>N1+1 THEN
--
Hiisi.
Registered Linux User #487982. Be counted at: http://counter.li.org/




More information about the fedora-list mailing list