FBA The Creator
http://www.fbacreator.com/fbaforum/

Add the "CASE" statement
http://www.fbacreator.com/fbaforum/viewtopic.php?f=3&t=52
Page 1 of 1

Author:  Boiled Sweets [ Thu Jun 19, 2008 11:34 am ]
Post subject:  Add the "CASE" statement

Currently if you have multiple conditions to check you have to use

if
elseif
elseif
elseif
end

This is tiresome - could we please have a CASE statement like VB, C etc...

SELECT CASE <variable>
Case 0
do something
Case 1
do something
END SELECT

MANY THANKS!

Author:  phrebh [ Thu Jun 19, 2008 4:53 pm ]
Post subject:  Re: Add the "CASE" statement

I second that notion!

Author:  umbiomar [ Fri Jun 20, 2008 10:46 am ]
Post subject:  Re: Add the "CASE" statement

FBA implements LUA as scripting language so extending the language is not an option I suppose.

Anyway there's a workaround, see the following

http://lua-users.org/wiki/SwitchStatement

Author:  phrebh [ Fri Jun 20, 2008 1:51 pm ]
Post subject:  Re: Add the "CASE" statement

Thanks for the link. I never thought of using an array like a case/switch statement, but I almost prefer it.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/