1: #line 1131 "./lpsrc/flx_tutorial.pak"
2:
3: var x = 1;
4: val p1 = { print x; };
5: proc p2() { print x; };
6:
7:
8: p1();
9: p1;
10: p2();
11: p2;
12: { print x; }();
13: { print x; };
14: print x; endl;
15:
The block is a procedure taking a unit argument.
So when you write one as a statement, it just gets
called: note that unlike C, that thing in
curley braces is an expression, and you must
make a statement by adding a semi-colon,
which has the effect of invoking it due to the
short cut rule.