Assigns a value to a variable or property.
variable [ := variable ]… := value
- A variable or property that you can change.
- An expression of a data type compatible with
The element on the left side can be a scalar variable, a property, or an array element.
:= assigns the value on its right to the variable or property on its left.
:= is almost the same as the operator
= when used to assign a new value to a variable.
= can do one of two operations: (1) assign a value to a variable or (2) do a test for equality.
But the operator
:= is for assignment only.
Note: The operator
:= is also used in procedure calls to pass arguments by name.
See Passing Arguments by Position and by Name for more information.
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