Exponentiation order: Difference between revisions

Line 887:
(5**3)**2: 15625
5**(3**2): 1953125</pre>
 
=={{header|Smalltalk}}==
Works in Smalltalk/X &sup1;
<p>Smalltalk strictly evaluates left to right; operators are not known to the language/parser, but instead message sends to the receiver on the left side (aka: virtual function calls) .
<lang smalltalk>Transcript show:'5**3**2 => '; showCR: 5**3**2.
Transcript show:'(5**3)**2 => '; showCR: (5**3)**2.
Transcript show:'5**(3**2) => '; showCR: 5**(3**2).</lang>
{{out}}
<pre>
5**(3**2) => 1953125
5**3**2 => 15625
(5**3)**2 => 15625
</pre>
Note &sup1; other Smalltalk's may define ** to simply call "raisedTo:", which is standard.
 
=={{header|Stata}}==
Anonymous user