11-10-2022, 03:46 PM
(11-10-2022, 01:46 PM)a740g Wrote: @dbox I use QBJS to try out ideas and code that I end up using elsewhere. It is an excellent resource for me that way. Thank you.
I have discovered that the following snippet in QBJS outputs different results compared to QB64-PE.
Code: (Select All)Print 10 + 20
Print 10 Or 20
In QB64-PE, it prints
30
30
And in QBJS, it prints
30
10
Yes, this is something I've gone back and forth on. QBasic really only has bitwise operators, where Javascript has both bitwise and logical operators. So, at present the only true bitwise operator in QBJS is XOR. All other operators are being converted to their logical equivalents in JS. I like being able to take advantage of shortcut evaluation in conditional statements, but it does present a compatibility challenge.