Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / BlueGui and Case Statements

Author
Message
Doosman
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location:
Posted: 19th Aug 2010 03:56
I need to do something of the sort, can it be done?
Select what
Case >79 and <90
do_stuf()
endcase
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Aug 2010 09:18
You can use case statements, but only with individual values. I do this with BlueGUI, but I split the functionality down into segments. Then one huge CASE statement finds the vague area, followed by inner CASE statements that find the exact element.

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Aug 2010 09:56 Edited at: 19th Aug 2010 09:56
Yeah BatVink is 100% right. SELECT/CASE isn't designed for ranges you would have to write in each number separated by commas.



The longest I've done was 60 for one case.



Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 19th Aug 2010 11:41
Why not just use an If statement....



My signature is NOT a moderator plaything! Stop changing it!
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 19th Aug 2010 20:07 Edited at: 19th Aug 2010 20:08
Quote: "Why not just use an If statement...."


Or even combining the two...



Login to post a reply

Server time is: 2026-07-24 23:40:38
Your offset time is: 2026-07-24 23:40:38