Module:Sandbox/Hellknowz/Test

This is an old revision of this page, as edited by Hellknowz (talk | contribs) at 12:34, 27 August 2013 (non zero based right). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local main = {};
 
function main.hello(frame)

    local args = frame.args
    local arg1 = args[1]
    local arg2 = args[2]
    local arg3 = args[3]
    local argNamed = args['named']

    local s = 'Params: '
    if (arg1 ~= nil) then s = s .. '1 = ' .. arg1 end
    if (arg2 ~= nil) then s = s .. '; 2 = ' .. arg2 end
    if (arg3 ~= nil) then s = s .. '; 3 = ' .. arg3 end
    if (argNamed~= nil) then s = s .. '; named = ' .. argNamed end
    return s

end
 
return main;