Modulo:Sandbox/Ignazio Cannata: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Contenuto cancellato Contenuto aggiunto
Ripristino |
Fix Etichette: Modifica da mobile Modifica da web per mobile |
||
Riga 11: | Riga 11: | ||
function p.ciao_nome1parent( frame ) |
function p.ciao_nome1parent( frame ) |
||
local debuglog = |
local debuglog = '' |
||
local args = frame:getParent().args |
local args = frame:getParent().args |
||
local outpot = " Ciao, " .. args[1] .. "! Questo messaggio |
local outpot = " Ciao, " .. args[1] .. "! Questo messaggio compare perché args2 è compilato: " |
||
if args[1] and args[2] then |
if args[1] and args[2] then |
||
debuglog = " args[2] = " .. tostring(args[2]) |
debuglog = " args[2] = " .. tostring(args[2]) |
Versione delle 03:07, 7 dic 2017
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 outpot = " Ciao, " .. args[1] .. "! Questo messaggio compare perché args2 è compilato: "
if args[1] and args[2] then
debuglog = " args[2] = " .. tostring(args[2])
return outpot .. debuglog -- Cos'è args2?
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