-
-
Notifications
You must be signed in to change notification settings - Fork 9
Assign Operator
IsaacShelton edited this page Mar 21, 2022
·
1 revision
The =
operator is used for assigning a value to a piece memory
x = 3
It can only be used as a statement, and the first operand must be mutable.
The =
operator can be overridden by declaring an __assign__
method.
func __assign__(this *T, other T) {
}
See __assign__
for more information.