Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lua recursion with function
--lua 5.3 print ("Hello, Nel! \n") n = 0 function preloop() local num = n while(n<5)do --if n <5 then next step will cause recursion. when n == 5, the current step will skip recursion print("Creating recursion on n == "..n) n=n+1 preloop() --call self again end print("n: "..n..", local num: "..num) end preloop()
run
|
edit
|
history
|
help
0
Lua Timer
Word by Word string partition in Lua
Random Item Generator (1 year)
Simple Lua primality test
The Pyramid in the two-dimensional array made of random stones - Lua
PAID HACK PuBG
zzz
Volume of sphere
Random number generation with ranges (Lua)
Show current system clock