-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
nxc.scroll
54 lines (46 loc) · 1.52 KB
/
nxc.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import ../code/conceptPage.scroll
id nxc
name Not eXactly C
appeared 2006
tags pl
fileType text
centralPackageRepositoryCount 0
country United States
originCommunity https://sourceforge.net/p/bricxcc/_list/tickets
reference https://www.hispabrickmagazine.com/pdfs/HBM009_EN/HBM009_EN-32-33.pdf
leachim6 NXC
filepath n/NXC.nxc
fileExtensions nxc
example
task main()
{
TextOut(0, LCD_LINE1, "Hello World");
}
lineCommentToken //
printToken TextOut
stringToken "
hasLineComments true
// A comment
hasComments true
// A comment
hasPrintDebugging true
hasSemanticIndentation false
hasStrings true
"Hello world"
wikipedia https://en.wikipedia.org/wiki/Not_eXactly_C
example
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
}
related assembly-language c nqc
summary 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. The IDE for NXC is the Bricx Command Center. The NXC compiler is available under the Mozilla Public License. A sample code is as shown below:
pageId 16826148
created 2008
backlinksCount 13
revisionCount 50
dailyPageViews 21
appeared 2006
isbndb 0