0
0

🧑‍💻 improve syntax of passing var by reference

This commit is contained in:
DrMaxNix 2022-05-10 21:55:33 +02:00 committed by GitHub
parent 90150f85a8
commit 41a665ccc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,12 +155,12 @@ pxl|pixel|canv|canvas draw
# - they can call other functions # - they can call other functions
# - their own vars are private # - their own vars are private
# - they can't acces root-scope's vars (except they were made global using `glob`) # - they can't acces root-scope's vars (except they were made global using `glob`)
# - args with $-prefix are copied into local scope # - args are copied into local scope
# - args with &-prefix are passed to parent scope # - args with &-prefix modify corresponding var in global scope
# the function scope "myfunction1" starts here # the function scope "myfunction1" starts here
# argument $1 is readonly; $2 is read/write # argument $1 is readonly; $2 is read/write
fcn|def myfunction1 $1 &2 fcn|def myfunction1 $1 &$2
# current function scope ends here # current function scope ends here
end end