New community dev tool uploaded: BASIC Line Number tool in Python

All aspects of programming on the Commander X16.
Post Reply
TomXP411
Posts: 1807
Joined: Tue May 19, 2020 8:49 pm

New community dev tool uploaded: BASIC Line Number tool in Python

Post by TomXP411 »




BASIC Line Number tool in Python




View File






This is a simple Python utility to add line numbers to BASIC programs.

GOTO and GOSUB use labels instead of line numbers, like this:



GOTO @HELLO 

END

@HELLO 

PRINT "HELLO WORLD"

In addition, the special @@ label resolves to "current line", like this:



GET A$:IF A$="" THEN @@ 

This will resolve to something like

100 GET A$:IF A$="" THEN 100

I have included a little Morse Code translator as a proof of concept and simple test program.

This program and the Morse demo are open source, distributed under CC-BY license. 

 






 
Post Reply