Last edit
Changed:
< == Warning!
to
> ==Warning!
Changed:
< * Traditional [[awk]] implementations do not provide an exponent [[arithmetic]] operator. The [[doublestar]] symbol used here for [[arithmetic]] exponential operations is a [[gawkism]] and will not work in traditional [[awk]].
< ** The doublestar gawkism**
< * The [[doublestar]] gawkism acts as a dyadic exponent [[operator]]. It returns the [[value]] given as a left [[operand]] to the power of the right [[operand]]. The [[operand]]s can be [[floating poin]]t values, producing a [[floating point]] value:
to
> *Traditional [[awk]] implementations do not provide an exponent [[arithmetic]] operator. The [[doublestar]] symbol used here for [[arithmetic]] exponential operations is a [[gawkism]] and will not work in traditional [[awk]].
> {{{
> }}}
> **The doublestar gawkism**
> *The [[doublestar]] gawkism acts as a dyadic exponent [[operator]]. It returns the [[value]] given as a left [[operand]] to the power of the right [[operand]]. The [[operand]]s can be [[floating poin]]t values, producing a [[floating point]] value:
Changed:
< ** Precedence**
< * The exponent operator gawkism has a higher [[precedence]] than all other [[arithmetic]] operators:
to
> **Precedence**
> *The exponent operator gawkism has a higher [[precedence]] than all other [[arithmetic]] operators:
Changed:
< ** Exponent Combination Assignment Operator**
to
> **Exponent Combination Assignment Operator**
The use of gawkisms will prevent the script from running correctly on systems that use a traditional awk interpreter.
The doublestar exponent operator is not available in traditional implementations
The doublestar gawkism
print (4 ** 3) # 64 (4 to the power of 3)
Precedence
print (2 * 4 ** 3) # 128 the exponent has a higher precedence than multiplication
Exponent Combination Assignment Operator
value **= 3 # value = value ** 3