Tips & Tricks¶
Get the most out of the MBASIC Tkinter GUI.
Note: Some features described below (Smart Insert, Variables Window, Execution Stack) are documented here based on the Tk UI design specifications. Check Settings for current implementation status or refer to the actual UI to verify which features are currently available.
Smart Insert for Rapid Development¶
Scenario: You have a skeleton and need to flesh it out:
Use {{kbd:smart_insert:tk}} (Smart Insert) to insert blank lines under each section without calculating line numbers!
Variables Window for Arrays¶
When working with arrays, keep Variables window open ({{kbd:toggle_variables:tk}}):
Watch each array element fill in real-time!
Execution Stack for Nested Loops¶
Press {{kbd:toggle_stack:tk}} (Toggle Stack) while stepping through nested loops to see the current state of all active loops.
Quick Testing Cycle¶
Fastest workflow:
No need to save between test runs! Save with {{kbd:file_save:tk}} only when satisfied.
Use Comments Liberally¶
MBASIC supports two comment styles:
Add comments with {{kbd:smart_insert:tk}} (Smart Insert).
Common Mistakes to Avoid¶
❌ Manually calculating line numbers → Use {{kbd:smart_insert:tk}} (Smart Insert) ❌ Running without saving → Save often with {{kbd:file_save:tk}} ❌ Ignoring ? markers → Fix syntax errors before running ❌ Not using Variables window → You're debugging blind! ❌ Stepping through entire program → Use breakpoints + Continue (Run menu)
Renumber Before Sharing¶
Keep development line numbers messy, but Renumber ({{kbd:renumber:tk}}) before sharing code. Makes it clean and professional.