📝 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
|
# - 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; $3 and $4 are optional and will default to `null`
|
||||||
def myfunction1 $1 &$2
|
def myfunction1 $1 &$2 ($3 $4)
|
||||||
|
|
||||||
# current function scope ends here
|
# current function scope ends here
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user