raz / conform / run / LimitParens.raz

13 lines · 720 B · raw · history · last change fa4b6510

1(* 63 levels of parentheses, and 63 calls nested, in one expression.
2 The least an implementation must accept (report section 10, Limits). *)
3module LimitParens;
4import Out;
5proc id(x: INT): INT;
6begin return x; end;
7var x: INT;
8begin
9 x := (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
10 Out.int(x); Out.char('\n');
11 x := id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(id(2)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
12 Out.int(x); Out.char('\n');
13end LimitParens.