From Modula-2 Reloaded

WiP: Exponentiation Operator

We may introduce an exponentiation operator in a future revision as follows:

The Exponentiation Operator

Symbol ** denotes the exponentiation operator. It is right associative and requires two operands.

Example:

 r := base ** exponent; (* exponentiation *)

The operator always represents the exponentiation operation. Its operands must be of a scalar type and they must be type compatible. Its result type is the operand type. Any use of the operator with operands that do not meet these conditions shall cause a compile time error. The exponentiation operator is bindable.

The operator would likely have precedence level-4.

Retrieved from http://modula-2.net/m2r10/pmwiki.php?n=WiP.ExponentiationOperator
Page last modified on 2015-09-22 13:02