Problem description:
The editor for the Basic and QBasic languages always add an indentation level after IF
…THEN
blocks. For example:
IF room=2 THEN PRINT "room 2"
After pressing Enter, the next line will be indented. This indentation level will follow you throughout the program even if you manually remove the indentation.
So:
IF room=2 THEN PRINT "room 2"
PRINT "What next?"
After pressing Enter, the editor will apply an indentation. It does not appear that the Replit editor allows you to turn off auto-indentation.
Adding the END
keyword to the line results in the editor no longer applying the indentation, which is great, except that it’s not valid BASIC syntax.
Expected behavior:
The editor should not indent lines that follow IF
…THEN
lines.
Actual behavior:
The editor does indent lines after IF
…THEN
statements
Steps to reproduce:
Start a BASIC or QBasic program. Type:
IF ROOM=1 THEN PRINT "Room 1"
Then press Enter.
Bug appears at this link:
https://replit.com/@celeste8/ExploreHouse#program.bas
Browser: Safari
OS: MacOS
Device (Android, iOS, NA leave blank): iMac
Desktop app version (Avatar menu->“Version”) or NA: NA
Plan (Free, Hacker, Pro Plan): Free