Difference between revisions of "User:Fivesteaks"

From All The Fallen Stories
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Test pages:
Test pages:
[[Module:FivesteaksPersistentTest]]
[[Module:FivesteaksPersistentTest]]
 
[[User:Fivesteaks/PersistentReadTest]]
Lua test:
<lua>
function bottle(x)
  if x > 1 then
    return x .. " bottles of beer"
  elseif x == 1 then
    return "One bottle of beer"
  else
    return "No more bottles of beer"
  end
end
 
function count(x)
  output = "<pre>"
  for beer = x, 1, -1 do
    output = output .. bottle(beer) .. " on the wall,\n"
    output = output .. bottle(beer) .. ",\n"
    output = output .. "Take one down, pass it around,\n"
    output = output .. bottle(beer-1) .. " on the wall.\n"
    output = output .. "\n\n"
  end
  return output .. "</pre>"
end
</lua>
 
==99 Bottles of Beer==
{{#luaexpr:count(99)}}

Latest revision as of 19:40, 5 November 2016