49
edits
| Line 36: | Line 36: | ||
context lua | context lua | ||
run `print(1+2);print(1+2)`;exit | run `print(1+2);print(1+2)`;exit | ||
</kua> | |||
Thus, when run directly in the context the first one works and the second one doesn't, third does: | |||
<kua> | |||
contexct lua | |||
// first | |||
function bob(s) print(s) end | |||
bob("fred") | |||
> fred | |||
// second | |||
function bob(s) -- Lua syntax error!!! | |||
print(s) | |||
end | |||
bob("james") | |||
// third | |||
run `function bob(s) -- Lua syntax error!!! | |||
print(s) | |||
end` | |||
bob("alan") | |||
> alan | |||
</kua> | </kua> | ||