Assigns a value to a variable. If this is its first use, the variable will be created and assigned the specified value. If the variable already exists, its value will be changed to the value specified.
Requires a variable name, followed by an equals sign (=), followed by a value. The value can be a string, an arithmetic expression, or a string expression.
{SET a = 5} {SET b = 3} {SET c = a + b + 4} {SET h = "Hello"} {SET w = "World"} {! string expression } {SET hw = {VAR h}{VAR w}} {! Concatenation of a string and variable} {SET mornin = "Good morning "{VAR w}} {! No space between closing quote and {VAR w} } {VAR hw}<BR> c = {VAR c} <BR> {VAR mornin}
This example produces the following output:
Hello World c = 12 Good morning World