To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 186
185  |  187
Subject: 
Re: case statement doesn't work- any clue?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 3 May 1999 15:45:41 GMT
Viewed: 
1148 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) (...) (25 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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR