Syntax Rules and Guidelines - Tutorials

Learning to use VEXcode V5 Text is similar to learning any other type of language. There are rules and guidelines for VEXcode V5 Text syntax, just like there are unique grammar rules for different languages. Two important rules are capitalization and camel casing. These rules make programs easier to read. Below is an example of a VEXcode V5 Text program.

The program consists of an instruction to the robot. In this example, the instruction is directing the Drivetrain (Device) to drive (command) forward 200 mm (parameters). When writing an instruction, the following rules apply.

  • Capitalization is important. Devices in VEXcode V5 Text should always be capitalized. Some examples of devices would include: Controller, Motor, and Gyro.

  • Camel Casing is used in the names of commands to identify word parts. The driveFor command would be one example of this naming convention in VEXcode V5 Text. In camel casing, the command must be written as one word and cannot begin with a capital letter.