Understanding Control Structures in VEXcode Pro V5

In addition to individual commands, control structures can also be used in a project to control program flow.

This main structure is an example of a control structure. Main controls the program flow by indicating where the project should start. Control structures typically use curly braces instead of semicolons.

Another type of control structure is a while loop. The while loop repeats the code between its curly braces as long as the condition of the while loop is true.

Once the condition of the while loop is no longer true, the program flow will exit the while loop.  

The program flow will continue running any instructions in the main structure. Since there are no remaining instructions, the program flow will reach the main structure’s closing brace, which causes this project to exit.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: