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.

The following subjects are covered in this document:


Related information about VTML and WIZML:

Tutorial
The Visual Tool Markup Language (VTML)
Reference
VTML reference - overview
Context
The WIZML Language
TAGLAYOUT

top

Tools

WIZSET plays a role in the following VTML-driven tools:

  1. Tag Editor
  2. Wizard

top


Location

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

top


Function

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

top


Syntax

<WIZSET VariableName="Expression">

Whitespace around the equals sign is allowed.

top


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.

top


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