SWAP Statement

The SWAP statement assigns the value of the variable on the right side of the swap operator (:=:) to the variable on the left side of the swap operator, and assigns the value of the variable on the left side of the swap operator to the variable on the right side of the swap operator. The lexical levels of the references must match, along with the type of the procedure reference variables and the parameters of the procedure reference variables.

<swap statement>

──┬─<integer variable>── :=: ──<integer variable>─────────────────────────┬──┤
  ├─<real variable>── :=: ──<real variable>───────────────────────────────┤
  ├─<dinteger variable>── :=: ──<dinteger variable>───────────────────────┤
  ├─<double variable>── :=: ──<double variable>───────────────────────────┤
  ├─<Boolean variable>── :=: ──<Boolean variable>─────────────────────────┤
  ├─<complex variable>── :=: ──<complex variable>─────────────────────────┤
  ├─<array reference variable>── :=: ──<array reference variable>─────────┤
  ├─<pointer variable>── :=: ──<pointer variable>─────────────────────────┤
  └─<procedure reference variable>── :=: ──<procedure reference variable>─┘

<integer variable>

A variable of type INTEGER.

<real variable>

A variable of type REAL.

<dinteger variable>

A variable of type DINTEGER.

<double variable>

A variable of type DOUBLE.