Creating a new variable
To create a new variable in the AME, first
click the <new variable> entry at the end of the Variable
list box. The AME creates a new variable and
assigns to it some initial characteristics that you should modify
to fit your needs. The initial values are:
- An initial name (such as $a1$).
- An initial type (string).
- An initial value, which depends on the type (see Table 1).
Note: If you create a string variable, you must enclose the initial
value in single quotes. Otherwise you will see a message stating that the initial value is an invalid expression.
Now you should set the values that you want for the new variable.
For example, if you are creating an integer variable that is for counting
screens and that should have an initial value of 1, then you might
set the initial values as follows:
- In the Name input field, type the name $intScreenCount$.
- In the Type list box, select the integer data type.
- In the Initial Value field, type 1.
Besides the Variables tab, the AME provides access, in several convenient locations, to a popup window for creating new variables. For example, in the Variable update action, the Name list box contains not only all the names of variables that you have already created but also a <New Variable> entry. Click this entry to bring up the popup window for creating a new variable. Variables created using this popup window are equivalent to variables created in the Variables tab.
For information about creating a variable in the Source view, see Creating a variable.