Subject:
|
Re: case statement doesn't work- any clue?
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Mon, 3 May 1999 15:45:41 GMT
|
Viewed:
|
1242 times
|
| |
| |
Luis Villa wrote:
> The problem is that the case statement appears to fail completely.
> Instead of outputting one value and then incrementing ID_number and
> waiting, it outputs all the values, and *then* waits for the button push ,
> as if they were a continuous list and not a case statement. Is this just
> poor coding on my part? Is this one of these hidden C/C++ differences? Or
> is this another LegOS limitation? (I'm leaning towards the last, but have
> not had a change yet to test this more generally.)
Doh! You haven't put any breaks between the cases. BTW, if LegOS can
change the semantics of C its cleverer than I thought ... :-)
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
|
|
Message is in Reply To:
| | case statement doesn't work- any clue?
|
| I'm trying to program some very rudimentary debugging stuff- just outputting variables to the screen. Basically, I want to use a switch/case statement to read an integer variable (in this case ID_number) which is then linked (by the case statement) (...) (26 years ago, 3-May-99, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|