From 41a665ccc27052dca105ec322c7de256b8563a89 Mon Sep 17 00:00:00 2001 From: DrMaxNix Date: Tue, 10 May 2022 21:55:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20improve=20s?= =?UTF-8?q?yntax=20of=20passing=20var=20by=20reference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ideas-1.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ideas-1.sh b/ideas-1.sh index 2173d50..6f90e84 100644 --- a/ideas-1.sh +++ b/ideas-1.sh @@ -155,12 +155,12 @@ pxl|pixel|canv|canvas draw # - they can call other functions # - their own vars are private # - they can't acces root-scope's vars (except they were made global using `glob`) -# - args with $-prefix are copied into local scope -# - args with &-prefix are passed to parent scope +# - args are copied into local scope +# - args with &-prefix modify corresponding var in global scope # the function scope "myfunction1" starts here # argument $1 is readonly; $2 is read/write -fcn|def myfunction1 $1 &2 +fcn|def myfunction1 $1 &$2 # current function scope ends here end