Thread: boolean
View Single Post
  #5   Spotlight this post!  
Unread 20-12-2004, 17:48
colt527 colt527 is offline
Registered User
AKA: Ken Colton
FRC #0527
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Long Island
Posts: 123
colt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to behold
Send a message via AIM to colt527
Re: boolean

I'm not 100% sure if this wouldn't work, but my original thought would be it wouldn't.

char boolVar = 1;

if(boolVar)
{
//Do this
}


but for && and || and != they all work the same:

char var1 = 1;
char var2 = 0;

if(var1 == 1 && var2 != 1)
{
//do this
}
__________________
Mentor, Team 527 -- Plainedge Red Dragons
FIRST Volunteer
SUNY Stony Brook Computer Science 2010
kcolton@gmail.com