Not Quite C
An editor has nominated this article for deletion. You are welcome to participate in the deletion discussion, which will decide whether or not to retain it. |
![]() | This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (August 2018) |
![]() | The topic of this article may not meet Wikipedia's general notability guideline. (October 2024) |
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: <syntaxhighlight lang="c">
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. }
</syntaxhighlight> Thus, motor A will go at full speed for two seconds before being turned off.
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 MS-DOS. One is the Bricx Command Center.
References
External links
Compiler sources:
IDE sources:
- for DOS Archived 2005-05-15 at the Wayback Machine
- for BeOS
- for OS X (Snow Leopard or Earlier)
- for Windows
- for Linux
- Noindexed articles
- Articles lacking in-text citations from August 2018
- Articles with invalid date parameter in template
- All articles lacking in-text citations
- Articles with topics of unclear notability from October 2024
- All articles with topics of unclear notability
- Webarchive template wayback links
- Lego Mindstorms
- C programming language family
- Robot programming languages
- Programming language topic stubs
- Lego stubs