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.

Newcomers AppGameKit Corner / Proper Syntax when combining OR AND conditions?

Author
Message
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 30th Jul 2019 17:01 Edited at: 30th Jul 2019 17:04
Got it...
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Jul 2019 22:23
It's important to remember that it will ALWAYS evaluate ALL conditions in an if statement
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 1st Aug 2019 17:55
But not always in the order you might expect. When in doubt it never hurts to parenthesize () for explicit grouping

X and y or z
X and (y or z)
(X and y) or z
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-11-21 12:41:14
Your offset time is: 2024-11-21 12:41:14