BBC BASIC for Windows
« Breakpoints and use of immediate. »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 11:32pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
The trouble with exiting to immediate mode in BBC BASIC is that (rather in the same way as with ON ERROR) the stack is cleared down. So you can't continue the program if it's in a PROC, FN or loop structure (e.g. FOR, REPEAT, WHILE). However if you only do it in the 'main loop', when the stack is empty anyway, it can be made to work.
Quote:
Is there anything similar in BB4W?
BB4W doesn't have 'breakpoints' as such, but if you insert a TRACE STEP ON in your code it will pause at that point and allow you to single-step. Since the 'breakpoint' is now part of the program it will take effect every time execution reaches that statement.
BB4W doesn't have 'breakpoints' as such, but if you insert a TRACE STEP ON in your code it will pause at that point and allow you to single-step. Since the 'breakpoint' is now part of the program it will take effect every time execution reaches that statement.
Users of 'LB Booster' will be aware that the latest release of that tool does support breakpoints, and may be wondering how that is achieved given that it translates the program into BBC BASIC!
In fact what happens is that the breakpoint causes a TRACE STEP statement to be automatically inserted into the program at that point. In the context of BB4W therefore, inserting a TRACE STEP is to all intents and purposes the same as adding a breakpoint.
Note that a program will only pause at the TRACE STEP when run from the IDE. If 'compiled' to an executable the breakpoint will not cause execution to pause, but it may slow the program very slightly so ideally it's better to remove any breakpoints when they are no longer needed.