Page 1 of 1

What's the code for 'or' statements?

PostPosted: Mon Aug 16, 2010 5:59 pm
by BloodRedDragon
Just a quick question. I know you can have 'if' statements but is there a code for 'or' aswell?

Thanks,
BRD

Re: What's the code for 'or' statements?

PostPosted: Mon Aug 16, 2010 7:30 pm
by Game A Gogo
if(YouLikeLife==1 || ILikeLife==1) // "||" is or in this case, && is and, > is greater, < is small, == is equal, >= greater or equal, <= smaller of equal, != not equal
{
//someone likes life!
}

Re: What's the code for 'or' statements?

PostPosted: Tue Aug 17, 2010 9:13 am
by BloodRedDragon
Thanks. You've been helping me a lot lately, so Im'a gonna give you a point!! Oh and i don't really know where to find the symbol for 'and' on my keyboard... :?

Re: What's the code for 'or' statements?

PostPosted: Tue Aug 17, 2010 1:34 pm
by lcl
BloodRedDragon wrote:Thanks. You've been helping me a lot lately, so Im'a gonna give you a point!! Oh and i don't really know where to find the symbol for 'and' on my keyboard... :?


Hold shift down and press 6 at the top of keyboard.
Put two of these & marks for 'and'. :D

And for getting the symbol for 'or' hold Alt Gr and press button on left of 'z'. It's <> button.
This way you can make '|' mark, and two of these work as 'or'. :D

Re: What's the code for 'or' statements?

PostPosted: Tue Aug 17, 2010 1:38 pm
by Game A Gogo
lcl wrote:And for getting the symbol for 'or' hold Alt Gr and press button on right of 'z'. It's <> button.
This way you can make '|' mark, and two of these work as 'or'. :D


not all keyboards are layered the same! my | is above enter, I have to press Shift and \ :D

Re: What's the code for 'or' statements?

PostPosted: Tue Aug 17, 2010 1:41 pm
by lcl
:o That's interesting... :lol:

Re: What's the code for 'or' statements?

PostPosted: Tue Aug 17, 2010 3:49 pm
by Game A Gogo
Most likely because I have Canadian standard... but there are a couple of USA's laying around in Canada too :P

Re: What's the code for 'or' statements?

PostPosted: Wed Aug 18, 2010 1:45 pm
by BloodRedDragon
yeah, shift and six gives me ^. Some keyboards are different. Ah, it's seven on mine, i didn't realise that & was an and symbol. :mrgreen: