📝 introduce optional parameters
This commit is contained in:
parent
d52cdc4874
commit
5cb7408ee7
@ -167,8 +167,8 @@ pxl|pixel|canv|canvas draw
|
||||
# - args with &-prefix modify corresponding var in global scope
|
||||
|
||||
# the function scope "myfunction1" starts here
|
||||
# argument $1 is readonly; $2 is read/write
|
||||
def myfunction1 $1 &$2
|
||||
# argument $1 is readonly; $2 is read/write; $3 and $4 are optional and will default to `null`
|
||||
def myfunction1 $1 &$2 ($3 $4)
|
||||
|
||||
# current function scope ends here
|
||||
end
|
||||
|
Reference in New Issue
Block a user