请输入您要查询的百科知识:

 

词条 Not Quite C
释义

  1. Simple program example

  2. Tournament legality

  3. Compilers and integrated development environments

  4. References

  5. Sources

  6. External links

{{no footnotes|date=August 2018}}

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.

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:

 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 two seconds, and then turn it off. }

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.

References

Sources

Compiler sources:

  • for Ubuntu

IDE sources:

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

External links

  • NQC Homepage
  • NQC tutorial by Mark Overmars
  • NQC tutorial by Matt Miller
{{Lego}}{{prog-lang-stub}}{{Lego-stub}}

3 : Lego Mindstorms|C programming language family|Robot programming languages

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 9:02:29