FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Sat Jun 10, 2023 7:25 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Add the "CASE" statement
PostPosted: Thu Jun 19, 2008 11:34 am 
Offline
FBA Startup-Logo Creator
FBA Startup-Logo Creator
User avatar

Joined: Wed Jun 18, 2008 11:40 am
Posts: 100
Location: Brighton, UK
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!

_________________
http://www.boiledsweets.com


Top
   
PostPosted: Thu Jun 19, 2008 4:53 pm 
Offline
Tutorials Contributor
Tutorials Contributor
User avatar

Joined: Tue Jun 17, 2008 3:39 am
Posts: 59
Location: Midwest, US
I second that notion!


Top
   
PostPosted: Fri Jun 20, 2008 10:46 am 
Offline
Feejo Member
Feejo Member
User avatar

Joined: Fri Mar 28, 2008 8:07 am
Posts: 64
Location: Italy
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

_________________
Regards,

umbiomar
umbiomar@gmail.com


Top
   
PostPosted: Fri Jun 20, 2008 1:51 pm 
Offline
Tutorials Contributor
Tutorials Contributor
User avatar

Joined: Tue Jun 17, 2008 3:39 am
Posts: 59
Location: Midwest, US
Thanks for the link. I never thought of using an array like a case/switch statement, but I almost prefer it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited