ALGOL W

Algol W is a version of the language Algol due to Niklaus Wirth, proposed like successuer of ALGOL 60 at the committee Algol 68. Although former to the Pascal, it was more powerful from certain points of view. In particular any expression or any block, in ALGOL W, brought back a result, which allowed the writing of particularly elegant expressions.

ALGOL-W is obviously a transitory stage between ALGOL 60 and Pascal. It represents a relatively light modification of ALGOL 60, to which NR. Wirth added the types of data " string" , " bitstring" , complex numbers and references to recordings (structures), as well as the passage of parameters per value, without changing large thing of other.

Like all the other languages of Wirth (Pascal, Modulated-2, Oberon, etc), ALGOL-W is a small language with static typing which differs much less ALGOL 60 than from Algol 68, language definitely more " gros" and more complex.

Example

record PERSSON ( string NAME; integer OLD; logical MALE; REFERENCE (PERSSON) FATHER, MOTHER, YOUNGESTOFFSPRING, ELDERSIBLING ); REFERENCE (PERSSON) PROCEDURE YOUNGESTUNCLE (REFERENCE (PERSSON) R); begin REFERENCE (PERSSON) P, M; P: = YOUNGESTOFFSPRING (FATHER (FATHER (R))); while (P ¬= null) and (¬ MALE (P)) OR (P = FATHER (R)) do P: = ELDERSIBLING (P); M: = YOUNGESTOFFSPRING (MOTHER (MOTHER (R))); WHILE (M ¬= NULL) AND (¬ MALE (M)) do M: = ELDERSIBLING (M); if P = null then M else if M = null then P else IF OLD (P) < OLD (M) THEN P ELSE M end

Random links:Daniel (prophet) | Ilunga Mbili | Otter Lake | Second district of the Vendée | Paul Struye | Comté_de_l'indépendance,_Arkansas