Hi, There is a discussion about this in the Wiki. http://lua-users.org/wiki/SwitchStatement If anyone comes up with a better solution than those proposed, it would be nice if it ended up there too. []s, Diego.