Order of Operations: is the documentation correct?
#1
https://qb64phoenix.com/qb64wiki/index.p...Operations

Basic's Order of Operations :


  1. Exponential and exponential Root calculations including SQR.
  2. Negation (Note that this means that - 3 ^ 2 is treated as -(3 ^ 2) and not as (-3) ^ 2.)
  3. Multiplication, normal Division, INTEGER Division and Remainder(MOD) Division calculations
  4. Addition and Subtraction calculations



Based on testing with QB64, line "3" above is incorrect.

In the screenshot, we see that division takes precedence over MOD.

If the same thing is happening with QB64PE, then the documentation ought to reflect that MOD (and integer division?) ought not be in the same precedence layer.

   
Reply


Messages In This Thread
Order of Operations: is the documentation correct? - by CharlieJV - 02-14-2023, 03:18 PM



Users browsing this thread: 7 Guest(s)