OPERATORS

Exponentiation assignment (^=)

Apply exponentiation to the current value of the target and the right operand.

Syntax

Signature
target ^= value

Description

Apply exponentiation to the current value of the target and the right operand. Store the result back in the target. The operand rules are those of ^.

Example

Exponentiation_assignment.prg
PROCEDURE Main()

   LOCAL nSide
   LOCAL nArea

   FOR EACH nSide IN { 3, 5, 8 }
      nArea := nSide
      nArea ^= 2
      QOut( "Tile side in cm", nSide, "area in square cm", nArea )
   NEXT

   RETURN

Output