= Operator

Assigns a value to a variable or property.

Syntax

variable = value

Parts

variable
A variable or property that you can change.
value
An expression of a type compatible with variable.

Instructions

The element on the left side of the equals sign (=) can be a simple scalar variable, a property, or an array element. The operator = assigns the value on its right to the variable or property on its left.

Note: This operator is different from the comparison operator =. See Comparison Operators for more information.

Because ViviFire uses this operator for two different operations, you usually cannot use it for chained assignments. For example, the statement a = b = c contains one assignment and one equality test. But the statement a := b := c contains two assignments.

Examples

Variable

The following example demonstrates the use of = as an assignment operator and comparison operator in the same statement:

Dim x, y 'x and y are initially zero
x = y = 0 ' y is being tested for equality to zero
After execution
variablevalue
x1
y0

Property

' Change value of property
#obj.value = 42

See also