August 2010
Intermediate to advanced
288 pages
13h 21m
English
NXT-G variables let you store the data that your program uses. Use the Edit Variables dialog to create variables, and use the Variable block to access the variables within your program. The programs presented in this chapter have shown you a few ways to use variables in your programs. Like data wires, variables add a lot of flexibility to the NXT-G language and are essential for solving many types of problems. You’ll see variables used in many of the programs in the coming chapters.
NXT-G 2.0 allows you to use constants in addition to variables. Constants make it more convenient to use values that don’t change, especially if you use them in many different programs.