Consecutive Branches are invalid: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "Bug Tracker Categories" to "Bug Tracker") |
m (1 revision imported) |
Latest revision as of 03:03, 11 October 2023
Description
Branch labels must head up a block of code, even a rem statement. If they don't and you list one [Branch Label] above another [Branch Label] Liberty will become confused when an event fires. It will appear to run normally from the IDE but if you run the code in debug or tokenise the code the error will show. This is a timer example but a button press event will display the same error.
Example code to demonstrate the bug.
[start]
[anotherlabel]
for k=1 TO 10
print k
next
timer 200,[start]
wait
Example code to work around the bug.
[start]
' this simple rem statement solves the problem
[anotherlabel]
for k=1 TO 10
print k
next
timer 200,[start]
wait