O'Reilly logo

Lego Mindstorms NXT-G Programming Guide, Second Edition by James Floyd Kelly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Program Structure

I don't really like using technical terms like "program structure," but it is a very useful concept that will benefit you as you begin to program your robots. The word structure implies some sort of organization or plan, doesn't it? By the time you finish this chapter, you should understand the importance of program structure to you and your robots.

What Do I Mean by Structure?

In Chapter 1, I gave you some examples of real-world programs. Would the following example have made any sense?

  • Teacher: Class, open your books to page 55.

  • [The class looks confused.]

  • Teacher: Class, I want you to get out your math books.

  • [Giving the teacher confused looks, the students get out their books.]

How can you read page 55 if you haven't ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required