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.

Author
Message
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 18th Mar 2003 13:05
I was just wondering if there where any elseifs in Darkbasic. I cant seem to find it and all the programming languages ive seen so far, have it. So does db have it?
--------
http://www.stellarblue.vze.com/
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 18th Mar 2003 14:19
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 18th Mar 2003 14:46
Yeah, I used to use ElseIf in VB all the time, DB can't do it though unless you want to nest If statements like FlashingBlade did.

"Computers are useless they can only give you answers."
JohnNotJon
21
Years of Service
User Offline
Joined: 24th Mar 2003
Location: United States
Posted: 28th Mar 2003 16:51
This seems to be one part of DB that falls way short. It really makes for some ugly code. In Flashingblade's example, there are 2 endif's, where as with an elseif then only one would be required. When you are checking against 10 things, this can get really messy!

But alas, I digress. I will take a little mess over doing a malloc any day!

Login to post a reply

Server time is: 2024-09-20 01:11:48
Your offset time is: 2024-09-20 01:11:48