<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 4/24/20 5:25 PM, Volker Kuhlmann
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20200424052537.GA30204@tui.site">
      <pre class="moz-quote-pre" wrap="">On Tue 21 Apr 2020 14:20:39 NZST +1200, Peter Ellens wrote:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">I of course used good old never fails BODMAS...  (until C! )
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
BODMAS? Is that edible?!???

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Addition (0x3FFFF - 0x4000 +1) becomes (0x3FFFF - 0x4001)
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Uhhmm... no.

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">But C doesn't do this...
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Maybe there's a very good reason it doesn't... Operator precedence in C
can be dicey in places, but not regarding addition or substraction.

Back when I was at school and C was a letter not a language,
(0x3FFFF - 0x4000 + 1) was ((0x3FFFF - 0x4000) + 1),
or ((0x3FFFF + 1) - 0x4000), but most
definitely not (0x3FFFF - (0x4000 + 1)). Addition is commutative,
subtraction is not.

Or, if you want, (+0x3FFFF + -0x4000 + +1) in any order of evaluation.

If you're referring to the "+" in "0x4000 +1" being a sign and not an
operator, the expression no longer has an operator. That's a no-go.
Mathematical notation allows to leave off an operator, then it becomes
multiplication. No programming language I've had contact with, including
C, have ever allowed that.

Are you blaming C, when your math is... in a bubble of one? ;-)

Unless some virus has turned my brain to mush, in which case you can all
have a laugh at my expense.

Volker

</pre>
    </blockquote>
    <p>Apparently I'm going senile...  luckily it doesn't effect the
      original bug, just the exact address point it starts to happen.</p>
    <p>From the internet:</p>
    <h2 style="margin: 60px 0px 12px; font: 30px champ, Verdana; color:
      var(--r1Clr); letter-spacing: normal; orphans: 2; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      text-decoration-style: initial; text-decoration-color: initial;">How
      Do I Remember It All ... ? BODMAS !</h2>
    <br style="color: rgb(51, 51, 51); font-family: Verdana, Arial,
      Tahoma, sans-serif; font-size: 15px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      text-decoration-style: initial; text-decoration-color: initial;">
    <table style="color: rgb(51, 51, 51); font-family: Verdana, Arial,
      Tahoma, sans-serif; font-size: 15px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
      left; text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      text-decoration-style: initial; text-decoration-color: initial;"
      border="0" align="center">
      <tbody>
        <tr>
          <td class="larger" style="font-size: 17px; color:
            var(--b3Clr);" width="60">
            <div align="center"><b>B</b></div>
          </td>
          <td><b>B</b>rackets first</td>
        </tr>
        <tr>
          <td class="larger" style="font-size: 17px; color:
            var(--b3Clr);">
            <div align="center"><b>O</b></div>
          </td>
          <td><b>O</b>rders (i.e. Powers and Square Roots, etc.)</td>
        </tr>
        <tr>
          <td class="larger" style="font-size: 17px; color:
            var(--b3Clr);">
            <div align="center"><b>DM</b></div>
          </td>
          <td><b>D</b>ivision and<span> </span><b>M</b>ultiplication
            (left-to-right)</td>
        </tr>
        <tr>
          <td class="larger" style="font-size: 17px; color:
            var(--b3Clr);">
            <div align="center"><b>AS</b></div>
          </td>
          <td><b>A</b>ddition and<span> </span><b>S</b>ubtraction
            (left-to-right)</td>
        </tr>
      </tbody>
    </table>
    <br class="Apple-interchange-newline">
    <p>This is not how I remembered it..  <br>
    </p>
    <p>I incorrectly remembered it as  Addition then Subtraction.  <br>
    </p>
    <p>Senility sucks...</p>
  </body>
</html>