From 427f84b4ec8e6d7d933b1b8142266aa5fa191a3e Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 30 Apr 2013 23:54:02 +0200 Subject: tester should work again; documented (;) --- doc/tut1.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/tut1.txt') diff --git a/doc/tut1.txt b/doc/tut1.txt index 7c2a35f94..2ca2a8ddd 100644 --- a/doc/tut1.txt +++ b/doc/tut1.txt @@ -515,6 +515,13 @@ contain indentation at certain places for better readability: As a rule of thumb, indentation within expressions is allowed after operators, an open parenthesis and after commas. +With parenthesis and semicolons ``(;)`` you can use statements where only +an expression is allowed: + +.. code-block:: nimrod + # computes fac(4) at compile time: + const fac4 = (var x = 1; for i in 1..4: x *= i; x) + Procedures ========== -- cgit 1.4.1-2-gfad0