Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Another thread already exists on this topic

???
03/07/09 22:23
Read: times


 
#163221 - switch basics?
Responding to: ???'s previous message
Hasn't this already been done for you in your previous thread:

http://www.8052.com/forum/read/163169

Walter Adrián Quiroga said:
I just want to know how to evaluate the four states with a "switch case"

As far as a 'C' switch statement is concerned, the meaning of the expression in the switch() is entirely irrelevant - it makes no difference whatsoever to the operation of the switch statement whether the values represent the states of a state machine, or days of the week, or anything else!

So this really is just a basic 'C' language question: do you know how to use a switch statement to test for one out of 4 possible values?

List of 4 messages in thread
TopicAuthorDate
I need some helo with this code            01/01/70 00:00      
   maybe if            01/01/70 00:00      
      Finite State Machine            01/01/70 00:00      
   switch basics?            01/01/70 00:00      

Back to Subject List