# Set variable

Use this part to assign a value to a variable.

1. Click on the left side of the assignment arrow to change the variable to which the value will be assigned.
2. Click on the right side of the arrow to change the value to be assigned to the variable. This can be:
   - A number
   - A string (in quotation marks)
   - A Boolean value (TRUE or FALSE)
   - Another variable
   - An expression.

The assignment operation will be carried out when the part is correctly connected within a routine, the routine is run and the part gains control.

Tips for use:

- This part can declare a variable: it need not use a variable that has already been used in the flowchart to run without error.
- You can use strings and Boolean values in flowcharts, but these may produce an error if you are exporting to BASIC to program real microcontrollers.

## See also:

- Variables, values and expressions
- Using flowcharts parts