
112 Chapter 6 • Programming the RCX
{
Off(OUT_A);
OnFwd(OUT_C);
}
void Turn_Right()
{
Off(OUT_C);
OnFwd(OUT_A);
}
www.syngress.com
Benefits of Designing Modular Code
If you follow the principles illustrated in this chapter when writing a
modular and well-structured code, your program will result in greater
readability, reusability, and testability:
■
Readability The program is organized into small sections that
are easy to comprehend with just a quick glance. This means
that your program will be easier to maintain, and more easily
understood by the friends with whom you share it.
■
Reusability Separating the logic of the program from the
instruction related to the ...