I've found a bug in the mikrobasic compiler.
This is my test program:
Code: Select all
program test_symbol_bug
symbol connected = 10
symbol disconnected = 20
dim i as char
main:
uart2_init(115200)
i = connected
do
if i = connected then
uart2_write_text("connected" + chr(13) + chr(10))
i = disconnected
else
uart2_write_text("disconnected" + chr(13) + chr(10))
i = connected
end if
delay_ms(2000)
loop until 1 = 0
end.
The output from the uC to the terminal should be "connected" and "disconnected" not the symbols declarated.
Thank you.