Not eXactly C is a programming language created in 2006.
#1100on PLDB | 18Years Old |
Not eXactly C, or NXC, is a high-level programming language for the Lego Mindstorms NXT designed by John Hansen in 2006. NXC, which is short for Not eXactly C, is based on Next Byte Codes, an assembly language. NXC has a syntax like C. Read more on Wikipedia...
task main()
{
TextOut(0, LCD_LINE1, "Hello World");
}
task main() //sets a new task. main() is compulsory
{
OnFwd(OUT_BC,75); //ask the motors connected to ports B and C to move forward at a power of 75.
Wait(5000); //wait for 5 seconds [the value is in milliseconds](note that 1000 = 1 second)
Off(OUT_BC); //off the motors connected to ports B and C
}
Feature | Supported | Example | Token |
---|---|---|---|
Strings | ✓ | "Hello world" | " |
Print() Debugging | ✓ | TextOut | |
Comments | ✓ | // A comment | |
Line Comments | ✓ | // A comment | // |
Semantic Indentation | X |