Aadvert

Untitled

Feb 19th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. local switchCases = {}
  2.  
  3. function switchCases.troll()
  4.     return "trololololo"
  5. end
  6. function switchCases.default(s)
  7.     return "Unrecognized input: " .. s .. "!"
  8. end
  9.  
  10. local input = read()
  11.  
  12. --Switch for input
  13.  
  14. print((switchCases[input] and switchCases[input] or switchCases["default"])(input))
Advertisement
Add Comment
Please, Sign In to add comment