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 / Problems with the or command

Author
Message
Meer Coder
19
Years of Service
User Offline
Joined: 7th Apr 2006
Location:
Posted: 7th Apr 2006 16:04
I am trying to get the hang of the or command and would like help or some examples of how to use it. I posted how i used it. I must be doing something wrong.
Relativity
20
Years of Service
User Offline
Joined: 29th Mar 2005
Location: Position is relative.
Posted: 7th Apr 2006 20:37
You may want to repost your source code in one of these:


Anyway, the OR command is really very simple. Suppose we have two arguments:

1=1
2=1

Now the AND command would work something like this:

IF 1=1 AND 2=1 THEN ... ELSE ...

As one, but not both, of the arguments are true, the program flow would go through the ELSE.

The OR command works like this:

IF 1=1 OR 2=1 THEN ... ELSE ...

The program flow would go through the THEN as 1=1 OR 2=1 is true. Got it. Of course, both could be true also, but at least one needs to be true to go through the THEN. If both are false, program flow goes through the ELSE command. Understand?

C="C"
Plus="+"
C+Plus+Plus="C++", see?

Login to post a reply

Server time is: 2025-05-23 21:29:24
Your offset time is: 2025-05-23 21:29:24