lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 1/25/06, Walter Cruz <walter.php@gmail.com> wrote:
> What about a switch statement too ?
>
> Sometimes is boring put if, else if, else if, else if :)
>
>
> []'s
> - Walter
>


switch = {}

 function switch.a() print("a") end
 function switch.b() print("b") end
 function switch.c() print("c") end
 function switch.d() print("d") end
 function switch.e() print("e") end

switch["a"]()


--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan