Modulo:Sandbox/Ignazio Cannata
Intestazione: Modulo:Sandbox/Ignazio Cannata/man
require('Module:No globals')
local p = {}
function p.ciao( frame )
return " Ciao, Ignazio! "
end
function p.ciao_nome1( frame )
return " Ciao, " .. frame.args[1] .. "! " .. frame.args[2] .. "? "
end
function p.ciao_nome1parent( frame )
local debuglog = ''
local args = frame:getParent().args
local valore_da_ritornare = " Ciao, " .. args[1] .. "! Lo sai che questo messaggio si vede perché args2 è compilato? " -- questo sarebbe l'output
if args[1] and args[2] then
debuglog = ' args[2] = ' .. tostring(args[2])
return valore_da_ritornare .. debuglog -- per scopo di test, fammi sapere effettivamente args2 cos'è
elseif args[1] and not args[2] then
return " Ciao, " .. args[1] .. " "
end
end
function p.ciao_nome2( frame )
return " Ciao, " .. frame.args["nome"] .. "! " .. frame.args["saluto"] .. "? "
end
function p.ciao_nome2b( frame )
return " Ciao, " .. frame.args.nome .. "! " .. frame.args.saluto .. "? "
end
return p