Using Nasal functions: Difference between revisions

Jump to navigation Jump to search
m
m (→‎Anonymous function arguments: remove my old comments. P.S.: Hooray seems to be in a SCNR attitude today ;), and yet I say... SCNR :lol:)
Line 102: Line 102:
== Default values for function arguments ==
== Default values for function arguments ==


Function arguments can have default values, as in C++. Note that the default value must be a scalar (number, string, function, nil) and not a mutable composite object (list, hash).
Function arguments can have default values, as in C++ or Python. Note that the default value must be a constant (number, string, function, or nil) and not a mutable composite object (list, hash).


<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
395

edits

Navigation menu