WIZSET

WIZSET creates and initializes a variable or assigns a value to an existing variable.

Together with WIZIF and WIZLOOP this completes the basic programming constructs of the WIZML language: assignment, sequence, conditional execution and repetition are all there.

Location

WIZSET can occur only within a TAGLAYOUT section or in a Wizard TEMPLATE.

Function

Creates and initializes a variable or assigns a value to an existing variable. A variable exists if:

Syntax

<WIZSET VariableName="Expression">

Whitespace around the equals sign is allowed.

Usage

If a variable of the referenced name does not yet exist, it is created first. Then the expression is evaluated and the resulting value is assigned to the named variable.

Examples

Assign the value of the variable EmptyTagEnd to the variable TagEnd; create TagEnd first, if it doesn't exist yet.

<WIZSET TagEnd = EmptyTagEnd>

Create a variable Tab and assign the ASCII TAB character to it. This variable can then be used in controlling layout of code written by WIZML.

<WIZSET Tab = Chr(9)>

Create a variable VertSpacingGap which can be used in controlling layout of code written by WIZML. The expression makes indenting whitespace (tabs) dependent on the existing variable numIndent.

<WIZSET VertSpacingGap = Chr(13) & Chr(10) & RepeatString(Chr(9),numIndent)>

top