Adds note about procs and multiple variable assignment.

This commit is contained in:
Grzegorz Adam Hankiewicz
2013-12-30 13:11:06 +01:00
parent 338a93f119
commit 9602349f30

View File

@@ -202,6 +202,12 @@ statement and all the variables will have the same value:
echo "x ", x # outputs "x 42"
echo "y ", y # outputs "y 3"
Note that declaring multiple variables with a single assignment which calls a
procedure can have unexpected results: the compiler will *unroll* the
assignments and end up calling the procedure several times. If the result of
the procedure depends on side effects, your variables may end up having
different values! For safety use only constant values.
Constants
=========