To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 943
  Error in program
 
Hi, can somebody tell me why this little program doesn't give any output? It just keeps running and doing nothing... int Edges[7], CounterLength=0; task main(){ SetSensor (SENSOR_2, SENSOR_TOUCH); until(CounterLength == 8){ Edges[CounterLength] = (...) (24 years ago, 31-Jan-01, to lugnet.robotics.rcx.nqc)
 
  Re: Error in program
 
Well I am just a newbie to NQC and to the whole Mindstorm experience, however here is what the compiler says when I try to compile the program that you submitted. Line 1: Error: RCX does not support Arrays I hope that this helps. Chris (...) (24 years ago, 1-Feb-01, to lugnet.robotics.rcx.nqc)
 
  Re: Error in program
 
Chris Hood wrote: > > Well I am just a newbie to NQC and to the whole Mindstorm experience, > however here is what the compiler says when I try to compile the program > that you submitted. > > > Line 1: Error: RCX does not support Arrays Hi Chris, (...) (24 years ago, 1-Feb-01, to lugnet.robotics.rcx.nqc)
 
  Re: Error in program
 
(...) Your array is too small, it runs from 0 to 6. Maybe you should also put a CounterLength = 0; before the first until. until(SENSOR_2 == 1); makes it wait for the sensor being pressed. Also, as a matter of style, I'd rather use (...) (24 years ago, 1-Feb-01, to lugnet.robotics.rcx.nqc)
 
  Re: Error in program
 
(...) Already got that answer, but thanks. (...) Done with initialization (int CounterLength=0;), isn't it? Please correct me if I am wrong. (...) Yes, you are right. But it didn't occur to me the time I wrote it. (...) (24 years ago, 1-Feb-01, to lugnet.robotics.rcx.nqc)

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