On Mon, 2009-12-07 at 23:31 -0800, Nickolas wrote:
> A note about articles structure: we consider Algol W, 58, 60 and 68
> to
> be dialects of single language Algol, not separate languages.
Interesting... I had not test driven the dialect button. And - although
obvious now - at the time I wasn't thinking of Algol68 as dialect of
Algol60.
In the following examples you will spot various similarities &
differences. AFAICS based on their actual syntax, the C programming
language could be a dialect of Algol68, and Algol60 could be a dialect
of Fortran.
Compare:
PROGRAM FLOATING POINT TEST
REAL A,B,C,D
READ *,D
DO 1, A = 0.0, 6.3, D
PRINT *
B = SIN(A)
C = COS(A)
PRINT '(3(F9.6:X)$)',A,B,C
1 CONTINUE
PRINT *
END
FLOATING POINT TEST;
BEGIN REAL A,B,C,D;
PRINT PUNCH(3),'Enter d:'
READ D;
FOR A:= 0.0 STEP D UNTIL 6.3 DO
BEGIN
PRINT PUNCH(3),££L??;
B := SIN(A);
C := COS(A);
PRINT PUNCH(3),SAMELINE,ALIGNED(1,6),A,B,C;
END'
END'
floating point test:
(
real a,b,c,d;
printf(($pg$,"Enter d:"));
readf(($g$,d));
for step from 0 while a:=step*d; a <= 2*pi do
printf($l$);
b := sin(a);
c := cos(a);
printf(($z-d.6d$,a,b,c))
od
)
floating_point_test()
{
int step;
float a,b,c,d;
printf("%s","Enter d:");
scanf("%f",&d);
for(step = 0; a=step*d, a <= 2*M_PI; step++){
printf("\n");
b = sin(a);
c = cos(a);
printf("%.6f %.6f %.6f",a,b,c);
}
printf("\n");
}
{I confess that I did the Algol68 in lower case to exasperate the
difference.}
Algol60 was inspired by Fortran, and used BNF - a 1 level grammar - to
define the syntax. Algol68 was inspired by Algol60 but used vW-grammar -
a 2 level grammar - to define syntax.
Algol60, AlgolW, Pascal, Modula and Oberon are defined with BNF and have
a common syntax. Algol68, Prologue are defined with vW-grammar and are
very different.
Basically, there was a significant fork in the Algol language tree.
Can I suggest an Algol60 dialect branch, and a Algol68 dialect branch?
See also: The comprehensive history of the project is C.H. Lindsey's "A
History of ALGOL 68" - http://portal.acm.org/citation.cfm?id=155365
And: C.H.A. Koster's "The Making of Algol 68" can be found at
http://www.cs.ru.nl/~kees/home/papers/psi96.pdf
You will see a greater divergence accompanied the syntax divergence.
Enjoy
NevilleDNZ