<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 11, 2017 at 2:12 PM, RedTigerFish <span dir="ltr"><<a href="mailto:chihuyu@gmail.com" target="_blank">chihuyu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Is it because that +, -, *, / have more precedence over power ?<br></blockquote><div><br></div><div>Others already gave good answers but I want to point out just one thing: the precedence rule is purely syntactical (i.e. computer decides it from only the text).  What those methods actually do is irrelevant.</div><div><br></div><div>For example, you can define a method called **, such as:</div><div><br></div><div>--------------</div><div>** aNumber</div><div>   ^ self raisedTo: aNumber.</div><div>-------------</div><div>and then, you can write:</div><div><br></div><div>2 ** 3 + 1</div><div><br></div><div>to get 9.</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">-- Yoshiki<div><br></div></div>
</div></div>