Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local switchCases = {}
- function switchCases.troll()
- return "trololololo"
- end
- function switchCases.default(s)
- return "Unrecognized input: " .. s .. "!"
- end
- local input = read()
- --Switch for input
- print((switchCases[input] and switchCases[input] or switchCases["default"])(input))
Advertisement
Add Comment
Please, Sign In to add comment