- {{#invoke:Sandbox/PHansen/a|main}}
Hello world
- Samhørende på enwiki en:User:PHansen
- 1) Modul: PHansen/Test (PHansen/Test) og Testside: PHansen/sandbox (PHansen/sandbox)
- 2) Modul: PHansen/a (PHansen/a) og Testside: PHansen/a (PHansen/a)
- Modul har :
--https://en.wikipedia.org/wiki/Help:Lua_for_beginners
--code snippet
local p = {} -- defines a variable p as an empty table, but *not* nil.
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
return p -- this returns the table p, which contains function p.main, which returns string "Hello world"