Puneet Varma (Editor)

Not Quite C

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Not Quite C (NQC) is a programming language, application programming interface (API), and native bytecode compiler toolkit for the Lego Mindstorms, Cybermaster and LEGO Spybotics systems. It is based primarily on the C 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.

Contents

Simple program example

A simple test program written in NQC for an RCX with a motor connected to output port A could look like this:

Thus, motor A will go at full speed for two seconds before being turned off.

Tournament legality

NQC is not legal in any tournaments sanctioned by FIRST. A number of teams have complained about this, so far without success.

Compilers and integrated development environments

NQC compilers and integrated development environments (IDEs) are available for many platforms including Microsoft Windows, Mac OS X, Linux, BeOS and DOS. One is the Bricx Command Center.

Compiler sources:

  • for Ubuntu
  • IDE sources:

  • for DOS
  • for BeOS
  • for OS X (Snow Leopard or Earlier)
  • for Windows
  • for Linux
  • References

    Not Quite C Wikipedia