zxbasic
zxbasic copied to clipboard
[Bug]: "Code" function behaves inconsistently with constant and non-constant parameter
Contact Details
No response
Compiler version
v1.18.1
What happened?
print code("a") * 3 ' prints "291"
dim char as string = "a"
print code(char) * 3 ' prints "35" (which is 291 truncated to byte size)
I'd expect that in both cases the result is the same.
Error and Warning messages
Code of Conduct
- [x] I agree to follow this project's Code of Conduct