Variable names in WML are prefixed with a dollar sign. The syntax is:
If the end of the variable is not indicated by white space, you must contain the variable inside a pair of parentheses:
The name of the variable can be composed of one or more uppercase or lowercase letters, digits, or underscores.
The use of any other character will generate an error. Variable names are case sensitive.
Variables can be assigned a value by using either the setvar or postfield elements. The value assigned to a variable can be substituted (displayed) in the text of a card.
In this example, card6 sets the values for two variables using two setvar elements and navigates to card7, where both values are displayed.
<?xml version="1.0"?>

<card id="card6">
Please click accept:
<do type="accept">
   <go href="#card7">
      <setvar name="NameVar" value="DevGuru" />
      <setvar name="NumVar" value="348" />

<card id="card7">
NameVar = $NameVar
<br />
NumVar = $NumVar


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information