'BEGIN'
'COMMENT' This example fails with marst 2.3 because of incorrect
generation of references to procedure blocks in some rare cases
(however it works with marst 2.4). This program was provided by
Jan van Katwijk ;
'COMMENT' Note that due to very deep recursion at run-time the stack
size should be large enough (about 8 Mb);
'INTEGER' I;
'INTEGER' 'PROCEDURE' a (K, X1, X2, X3, X4, X5);
'VALUE' K; 'INTEGER' K, X1, X2, X3, X4, X5;
'BEGIN'
'INTEGER'' PROCEDURE' b;
'BEGIN'
K := K - 1;
a := b := a (K, b, X1, X2, X3, X4)
'END';
'IF' K <= 0 'THEN' a := X4 + X5 'ELSE' b
'END';
'FOR' I := 1 'STEP' 1 'UNTIL' 15 'DO'
'BEGIN'
OUTINTEGER (1, a (I, 1, -1, -1 , 1 , 1));
OUTSTRING (1, "\N")
'END'
'END'