Name Rules for Variables- Tutorials - VR Blocks

In VEXcode VR, you are required to give a name to a new variable when you create one.

The following article will cover:

  • Valid Name Rules
  • Possible Name Errors

Valid Name Rules

Variable names must be unique, but there are other specifications that the name must follow. 

Variable names are used in the following places:

  1. Numeric (created using “Make variable”)
  2. Boolean (created using “Make a boolean”)
  3. List (created using “Make a List”)
  4. 2D List (created using “Make a 2D List”)


Here is an overview of the criteria when choosing a valid name:

  • The name cannot use special characters.bigNumber
  • The name has to begin with a letter. It cannot start with a number.2ndWheel
  • The name cannot use spaces.previousnumber
  • The name cannot be a reserved word in VEXcode VR. A reserved word is a word or name that VEXcode VR is already using. ifExamples: for, while, break, else, not.
  • The name has to be unique (only used once), but you can have different cases (one uppercase and one lowercase).counter

Possible Name Errors

When you create a variable name, if you see a “Name Taken” error, it means there is a duplicate name in any of the groups above. 

Variable duplication