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 / 526
  NQC Ignores based on your pbrink
 
Dave Can you setup NQC to automatically ignore things a pbrink doesn't understand? For example The scout. I have a program that I use in my 2 RCX's and my 1 scout. But Constantly have to /* */ the offending code for the scout. Is there some way we (...) (25 years ago, 8-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
(...) Coincidentally, I think someone just posted the answer to your question a few hours ago.... (URL) (25 years ago, 8-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
(...) Very True. Does anyone know when downloading to Scout with RCXCC will be ready? Dean -- Coin-Op's For Sale!: (URL) Lego Workshop: (URL) Lego Club: (URL) (25 years ago, 8-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
(...) Yes, I agree with the approach to using __RCX for conditional compile - that's really why its there. I had thought about adding some of the functions (SetSensor() etc.) as no-ops in the Scout API, but this really didn't feel right to me. I (...) (25 years ago, 8-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
Have you considered adding the firmware build version to that symbol or to a new one? __RCX = 2 __FIRMWARE=3.21 This would facilitate creation of portable, work-around code that would accomodate an end-user who hasn't updated their firmware (or has (...) (25 years ago, 9-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
(...) This first define (__RCX = 2) will happen automatically in NQC when you select RCX 2.0 as the target for compilation. Selecting an RCX 1.0 target will cause the symbol to be defined as 1. (...) I hope I don't have to add a __FIRMWARE symbol... (...) (25 years ago, 9-Apr-00, to lugnet.robotics.rcx.nqc)  
 
  Re: NQC Ignores based on your pbrink
 
(...) This seems reasonable to me. Plus, it has the added benefit of being inherently open: source is all about "here's how to do this"; binaries are "here's a thing that does this". It's nice to encourage the first attitude. (25 years ago, 9-Apr-00, to lugnet.robotics.rcx.nqc)  
 
  Re: NQC Ignores based on your pbrink
 
I definitely intended to mean portable source. And that the "__FIRMWARE" would be used in compiler directives rather than in the code. It is a simple matter for me to define my own __FIRMWARE (or anything else, right?) and do #ifdef's to my heart's (...) (25 years ago, 9-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
(...) I agree wholeheartedly. I don't want to see people selling their bot code. It's all about sharing and learning. Dean -- Coin-Op's For Sale!: (URL) Lego Workshop: (URL) Lego Club: (URL) (25 years ago, 9-Apr-00, to lugnet.robotics.rcx.nqc)
 
  Re: NQC Ignores based on your pbrink
 
(...) Yep, you can #ifdef however you want, and NQC supports -D and -U options on the command line that allow you to define (or undefine) symbols before the compile takes place. This is handy if you're using Makefiles, but even in an ordinary shell (...) (25 years ago, 9-Apr-00, to lugnet.robotics.rcx.nqc)  

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