Compiles a string of Lua code
Parses the string and returns the compiled chunk as a function. Does not execute it.
You can avoid the intermediate variable "f" in this example by simply putting the brackets on the same line:
If the string was produced by string.dump, loadstring converts it back into the original function.
See Also ...
assert - Asserts that condition is not nil and not false
Lua base functions
(Help topic: lua=loadstring)
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )