Contact Details
No response
Compiler version
v1.18.7
What happened?
I've started porting a game to Boriel Basic assuming (wrongly) that K and K$ would refer to different variables. It seems not to be the case, which is fine, so I've given K$ another name. But now if I use K$ by mistake in the code, it still refers to K, which I've declared as UByte! Shouldn't this trigger an error?
Here's an example:
DIM K AS UByte
K=1
K$=2 'the compiler does not complain!
PRINT K;"/";K$ 'prints 2/2
A solution may be to consider the '$' a part of the variable's itentifier, so K and K$ would indeed be different variables, as in Sinclair Basic.
Error and Warning messages
Code of Conduct
Contact Details
No response
Compiler version
v1.18.7
What happened?
I've started porting a game to Boriel Basic assuming (wrongly) that K and K$ would refer to different variables. It seems not to be the case, which is fine, so I've given K$ another name. But now if I use K$ by mistake in the code, it still refers to K, which I've declared as UByte! Shouldn't this trigger an error?
Here's an example:
A solution may be to consider the '$' a part of the variable's itentifier, so
KandK$would indeed be different variables, as in Sinclair Basic.Error and Warning messages
Code of Conduct