Assignment Operators
Assignment operators are different than logical or arithmetic operators in that the latter two can be characterized as performing an operation on one or more values and then returning a result, whereas the assignment operator takes the value of something on the right side of the operator (a value or a reference) and assigns it to the item on the left side of the operator.
Assignment operator (=)
Operand count
2
Types
.nul
, .inf
, blob
,
boolean
, integer
,
number
, string
Description
The value of the right side of the assignment operator is assigned to the item
on the left side of the operator. The assignment operator differs from the equals
operator in BASIC in that it can only be used for assignment in SIMPOL, not for
comparisons. For comparisons the ==
operator must be used.
Numbers can be assigned to integers but will lose their fractional component and
strings can be assigned to blobs but they must consist only of characters that are
less than 256 in value.
Reference assignment operators (=@, @=)
Operand count
2
Types
.nul
, any object
,
Description
A reference to the object on the right side of the assignment operator is assigned to the item on the left side of the operator.