Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Runtime-evaluation/Lua/runtime-evaluation-1.lua
Normal file
5
Task/Runtime-evaluation/Lua/runtime-evaluation-1.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
f = loadstring(s) -- load a string as a function. Returns a function.
|
||||
|
||||
one = loadstring"return 1" -- one() returns 1
|
||||
|
||||
two = loadstring"return ..." -- two() returns the arguments passed to it
|
||||
2
Task/Runtime-evaluation/Lua/runtime-evaluation-2.lua
Normal file
2
Task/Runtime-evaluation/Lua/runtime-evaluation-2.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
f = load("return 42")
|
||||
f() --> returns 42
|
||||
6
Task/Runtime-evaluation/Lua/runtime-evaluation-3.lua
Normal file
6
Task/Runtime-evaluation/Lua/runtime-evaluation-3.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
> f = load("return 42")
|
||||
> f()
|
||||
42
|
||||
> n = load("return 42")()
|
||||
> n
|
||||
42
|
||||
Loading…
Add table
Add a link
Reference in a new issue