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 Discussion / if then statements in DB

Author
Message
lich
22
Years of Service
User Offline
Joined: 18th Jan 2003
Location:
Posted: 18th Jan 2003 20:29
Ok, does Dark Basic support multiple argument IF statements? As in.... IF arguement AND arguement OR arguement THEN...... If so what tdo they look like? thanks in advance.
Jadelion
22
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 18th Jan 2003 20:43
I know that the

IF argument AND argument THEN

works I haven't tried OR

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Jan 2003 20:43
I think you mean something like :

IF ..
ELSE
IF ..
ELSE

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 18th Jan 2003 22:31
This works:

Delta
22
Years of Service
User Offline
Joined: 15th Nov 2002
Location:
Posted: 19th Jan 2003 02:03
as far as i'm aware it dosn't you need to do them seperatly, or by using an "Else If"
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 19th Jan 2003 03:07
You can also use && and || on an IF statement for extra conditions. I.e.:

IF x=1 && y=1 || y=2 then ...

I don't think it's documented (eh-hum..) but it's there.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 19th Jan 2003 03:17
Quote: "
You can also use && and || on an IF statement for extra conditions. I.e.:

IF x=1 && y=1 || y=2 then ...
"


Erm, not in DB classic.

Ogres have layers.

Login to post a reply

Server time is: 2025-05-16 13:18:28
Your offset time is: 2025-05-16 13:18:28