To create a new variable go to the VARIABLES tab and click the ADD VARIABLES + button. Variables are named alphabetically and a new variable will be created with the name next in line of the alphabet. i.e. when variables $a and $b already exist, variable $c will be created.


When you click on the name of the variable, you can rename the variable by giving it an alias. Note that the original value will also still be available for use.

Rules for alias names are that an alias

  • must start with a letter

  • cannot start with a number

  • can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )

Create a variable

Variables have an id and four fields to maintain:

  1. id: is a letter from the alphabet. Whenever you want to reference this variable, use the id of the variable with a $ as a prefix: e.g. reference variable a as $a. After $v, the variable list continues with wa, wb, etc. The maximum number of variables per exercise is 126. You can also create your own alias.

  2. definition:: here you define the value of the variable by using valid php. You can use php math functions, as described here:

Extra functions are available via the prefix sw_. {A list of extra functions can be found here}

Did this answer your question?