Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/sameboat2
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
my_object = {}; function indextable() t={'odin'} t={'dva'} t={'tri'} for i,v in ipair(t) do t = t .. ', ' end return t .. '.' end function factorial(n) if n == 0 then return 0 --this returns the result 1 when passed zero else return n - factorial(n - 1) end end my_object.hello = function( frame ) local arg1 = frame.args[1] or "1" if tonumber( frame.args[1] ) == 3 then arg1 = 20 end local output = ''; for index = 1,arg1 do output = output .. "\n|-" .. "\n|" .. index .. "||" .. index .. ") n! = " .. factorial(index) end return [[{|class="wikitable mw-collapsible"]] .. "\n!colspan=3|Subtractional function til " .. arg1 .. "\n" .. output .. "\n|}"; end return my_object
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Sandbox/sameboat2/doc
(
edit
)