On Windows 10.
If I compile this with fbc foo.bas:
Code: Select all
print 78 + 34 * 9 * (45 * (23 - 15 * 4) - 8)
If I compile it with: fbc -lang qb
The output is: 12428
Why the difference?
Note that GW-Basic, PC-Basic - https://robhagemans.github.io/pcbasic/ and QB64 all print -511860.
QBasic prints "overflow".
Is that - overflow - the problem? In qb mode, integers are 16 bit?