You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A saved BASIC program listing which resembles the following ...
5 :::::::::::::::
10 : REM Hello W :
15 :::::::::::::::
20
25 PRINT "Hello there, World!"
30 GOTO 25
... will currently load into Agon BASIC as the following instead:
5 :::::::::::::::
10 : REM Hello W :
15 :::::::::::::::
This gives the impression that when the LOADer encounters a blank line, such as in Line 20 above, the LOADer believes that the EOF has been reached.
Currently, such BASIC program listings could only be authored outside of Agon BASIC (such as in Nano or in the BBC BASIC IDE), since it is not possible within BBC BASIC to enter a line number without any keywords or tokens and press Enter without it being interpreted as manually deleting a line of BASIC code (whether it exists or not in the listing.
Interestingly, a BBC tokenized program with an empty line does LOAD into Agon BASIC without issue, which leads me to believe that support for BAS program listings with empty lines is merely a limitation of the text loading support of the LOAD command.
SIDE NOTE: If folks wish to be able to enter empty lines of code within Agon BASIC, then the BASIC/MOS editor would need to be enhanced to support the entry of empty line numbers, but it should only support that behavior when the line number does not already exist, otherwise support for manually deleting a line of BASIC code by entering its line number would be broken. An alternative way to support this behavior within Agon BASIC might be to enforce a definition that an empty line of BASIC is a line number followed by at least one space.
The text was updated successfully, but these errors were encountered:
Note, you can use a statement separator : on its own to space out listings, eg:
5 :::::::::::::::
10 : REM Hello W :
15 :::::::::::::::
20 :
25 PRINT "Hello there, World!"
30 GOTO 25
The examples in the BBC BASIC (Z80) manual use this technique for empty lines but it doesn't explicitly recommend it as a convention for making a more readable listing. I can add a note to that effect.
Note, you can use a statement separator : on its own to space out listings
Yep. Adding a single : is the most straightaway edit to make to such BASIC code to get it to LOAD properly with Agon BASIC, although it can be a bit tedious to do with nano when there are several blank lines in the code to be remedied.
A saved BASIC program listing which resembles the following ...
... will currently load into Agon BASIC as the following instead:
This gives the impression that when the
LOAD
er encounters a blank line, such as inLine 20
above, theLOAD
er believes that the EOF has been reached.Currently, such BASIC program listings could only be authored outside of Agon BASIC (such as in Nano or in the BBC BASIC IDE), since it is not possible within BBC BASIC to enter a line number without any keywords or tokens and press
Enter
without it being interpreted as manually deleting a line of BASIC code (whether it exists or not in the listing.Interestingly, a BBC tokenized program with an empty line does LOAD into Agon BASIC without issue, which leads me to believe that support for BAS program listings with empty lines is merely a limitation of the text loading support of the
LOAD
command.SIDE NOTE:
If folks wish to be able to enter empty lines of code within Agon BASIC, then the BASIC/MOS editor would need to be enhanced to support the entry of empty line numbers, but it should only support that behavior when the line number does not already exist, otherwise support for manually deleting a line of BASIC code by entering its line number would be broken. An alternative way to support this behavior within Agon BASIC might be to enforce a definition that an empty line of BASIC is a line number followed by at least one space.The text was updated successfully, but these errors were encountered: