1,089
edits
(Argument passing by value / by reference) |
|||
Line 201: | Line 201: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
var log_message = func(msg="error") { | var log_message = func(msg = "error") { | ||
print(msg); | print(msg); | ||
} | } | ||
Line 210: | Line 210: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
#Incorrect: | #Incorrect: | ||
var log_message = func(msg="error", line, object="ground") { | var log_message = func(msg = "error", line, object = "ground") { | ||
#some code | #some code | ||
} | } | ||
Line 217: | Line 217: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
#Correct: | #Correct: | ||
var log_message = func(line,msg="error", object="ground") { | var log_message = func(line, msg = "error", object = "ground") { | ||
#some code | #some code | ||
} | } |
edits