Module:Sandbox/PHansen/Test

--https://en.wikipedia.org/wiki/Help:Lua_for_beginners --testes via: User:PHansen/sandbox local p = {} -- defines a variable p as an empty table, but *not* nil. text = "Hello world"

--function p.main( frame ) -- this block defines the table element p[main] as the _function_ listed below --   return "Hello world" -- the string result --end -- ends the block defining p.main function p.main( frame ) -- this block defines the table element p[main] as the _function_ listed below

if string.len(text) < 15  then     --<<<<<<<<<<<<<<<<<<<<<  nil ? return ("Under 15")

else return text -- the string result end end -- ends the block defining p.main

return p -- this returns the table p, which contains function p.main, which returns string "Hello world"