11-01-2021, 04:14 PM
(10-30-2021, 05:57 PM)boriel Wrote: Can you explain further, please?
What does not work? Are you compiling with —sinclair or —strict-bool options?
If not, try it and let me know.
I thought Sinclair option just involved the ATTR, SCREEN$ and POINT features.
I discovered this compiler some days ago and to me it's superb.
However, I've tested the following program and results aren't as I expected (I compiled it with ZX Basic 1.16.0):
Code:
10 let n = 2
20 let n = (n+1) AND n<3
30 print n
100 let n = 20
200 let n = (n+1) AND n<3
300 print n
These are:
With Fuse emulator, a Spectrum +2 prints:
3
0
With Zx Basic and Sinclair option enabled, the Spectrum prints:
1
0
With Zx Basic and strict boolean option enabled, the Spectrum prints:
1
0
With Zx Basic and both Sinclair and strict boolean options enabled, the Spectrum prints:
1
0
Now I've realized that my python version is 3.6.9. Could this be the problem?