Operator: ** (Exponent)

Top  Previous  Next

The ** operator will calculate the exponential value.

 

 

Example:

INCLUDE rtcu.inc
 
VAR
  a : INT;
  b : INT;
END_VAR;
 
PROGRAM test;
 
BEGIN
  ...
  a := 3;
  b := a ** 4; // The result will be 3 * 3 * 3 * 3 = 81
  ...
END;
 
END_PROGRAM;