Module:Sandbox/Luis150902
< Module:Sandbox
Jump to navigation
Jump to search
Revision as of 14:22, 23 September 2015 by blackwiki>Renamed user awfwvowjvwrvnwio (←Created page with '--This is a test created by Luis150902 local test = {} local getArgs = require("Module:Arguments").getArgs function test.f1(frame) local args = getArgs(fr...')
Contents
Information
Uses Module:Arguments and Module:Yesno.
Usage
{{#invoke:Sandbox|function_name|args}}
, where function_name is "f" followed by a natural number (N) and args is a pipe-separated list of arguments.
N = 1
Gets the length, in characters, of the first argument.
N = 2
Counts its arguments.
N = 3
Performs the operation specified by the first argument in the remaining arguments.
Available operations: "+", "-", "*", "/", "%", "!" (boolean NOT).
--[[This is a test created by Luis150902]]
local test = {}
local getArgs = require("Module:Arguments").getArgs
function test.f1(frame)
local args = getArgs(frame)
return args["1"].length
end
return test