User Tools

Site Tools


script:walkthrough:miscellaneous
Scopes 
 

Miscellaneous

Script return value

In certain circumstances, it is useful to return a value from the entire script itself, and not just from a function. For example, the argument to eval() is a script whose return value is returned to the caller.

The script return value is the final evaluated expression of the script.

if True
    "I am the return value."
else
    "I could be, too."
end
script/walkthrough/miscellaneous.txt · Last modified: 2019-11-21 05:39 by skyjake