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 / Why isn't there a switch statement?

Author
Message
Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 25th Apr 2012 22:52
It's the only real thing about DBPro that bothers me. Is there any alternative to stacked IF statements or will I be stuck using these forever?

Benjamin
23
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 25th Apr 2012 22:57
What you are looking for is SELECT.



Support a charitable indie game project!
Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 25th Apr 2012 23:03
I feel completely stupid for missing that. And I've read through the commands list. Thanks.

Daniel wright 2311
User Banned
Posted: 25th Apr 2012 23:04
Select case works well,I use it all the time,it is a built in switch for every thing.

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-08 22:19:35
Your offset time is: 2026-07-08 22:19:35