Not Quite C
From Wikipedia, the free encyclopedia
Not Quite C (NQC) is a programming language, API and native byte-code compiler toolkit for the Lego Mindstorms, Cybermaster and lego Spybotics systems. It is based primarily on the C programming language but has specific limitations, such as the maximum number of subroutines and variables allowed, which differ depending on the version of firmware the RCX has. The language was invented by David Baum. He has released two books on the subject.
NQC Integrated Development Environments are available for many platforms including Microsoft Windows, Mac OS X, Linux, BeOS and DOS.
[edit] Simple program example in NQC
A simple test program written in NQC for an RCX with a motor connected to output port A could look like this:
task main () // main program { SetPower(OUT_A, OUT_FULL); // turn on motor A at 100% power OnFor(OUT_A, 200); // let the motor run for 2 seconds, then turn it off }
Thus, motor A will go at full speed for two seconds before being turned off.
[edit] Tournament Legality
NQC is not legal in any tournaments sanctioned by FIRST. A number of teams have complained about this, so far without success.
[edit] See also
Various platform IDEs:
- NQC IDE for DOS
- NQC IDE for BeOS
- NQC IDE for OS X
- NQC IDE for Windows
- NQC IDE for Linux
- NQC for Ubuntu
Other links:
|