Changes the value of a variable or property.
variable [ := variable ]… := value
- A variable or property that you can change. You can set many in one statement.
- 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.
:= sets the value of the variable on its left to the value on its right.
:= is almost the same as the operator
= when used to change the value of a variable.
= can do one of two operations: (1) change the value of a variable or (2) do a test for equality.
But the operator
:= is for assignment only.
You can also use the operator
:= in procedure calls to pass arguments by name.
See Passing Arguments by Position and by Name for more information.
The code that follows shows how a 3-D program can set its variables for x, y, and z to zero:
x := y := z := 0.0
' Change value property #obj.value := 42