Assigns a value to a variable or property.
variable := value
- Necessary. Any modifyable variable or property.
- Necessary. Any expression of a type compatible with variable.
The element on the left side 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.
The := operator acts like the = operator to assign a new value to a variable, except that := offers more flexibility in its placement. Unlike the = operator, the := operator's only function is assignment; whereas, the = operator can represent either assignment or comparison, depending on context.
The following code shows how a 3-D application can zero out its x, y, and z variables:
x := y := z := 0
' Change value property #obj.value := 42