View Single Post
  #11   Spotlight this post!  
Unread 14-03-2008, 13:46
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: General question.

Well, a switch's condition can't be func2 = 1 (the switch is ON func2)

IMO switches are more trouble than they are worth

I would just use something like this

Code:
if(func1 == 1){ //remember, == is equality test, = is assignment
  //do stuff if func1 is true
  if(func2 == 1){
    //do stuff if func1 and func2 are true
  }else{
    //do stuff if func1 is true and func2 is false
  }
}else{
  //do stuff if func1 is false
  if(func2 == 1){
    //do stuff if func1 is false and func2 is true
  }else{
    //do stuff if func1 and func2 are false
  }
}