Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » operators » ^^=
next | previous | forward | backward | up | index | toc

# ^^= -- augmented assignment for ^^

- Usage:
    `x ^^= y`

## Description

In most cases, `x ^^= y` is equivalent to `x = x ^^ y`, unless a method is installed for the class of `x`.

## See also

- ^^ -- logical exclusive-or
- augmented assignment
- installing augmented assignment methods

## Ways to use symbol ^^=:

- AtomicInt ^^= ZZ -- atomic fetch and bitwise xor

## For the programmer

The object ^^= is a keyword.

This operator may be used as a binary operator in an expression like x^^=y. The user may install a method for handling such expressions with code such as

             X ^^= (x,y) -> ...

where X is the class of x.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/operators/augmented_assignment.m2:39:0.