Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was never a big fan of Microsoft Basic. My prefered systems were BBC Basic (BBC Micro) and Locomotive BASIC (Amstrad CPC). Locomotive was larged based on BBC BASIC and both had a command called RENUM that would renumber your source for you. It was invaluable for smaller projects but I remember some of my larger projects I would have routines separated by thousands. eg

    10 REM main routine
    20 REM do stuff
    1000 REM another routine
    1010 REM do other stuff
    2000 REM a 3rd routine
Then have GOSUBs / GOTOs using the n*1000 as the entry point into that routine. RENUMing the source when you've got the aforementioned structure was not an option.


ISTR that Locomotive's RENUM took optional arguments that let you renumber chunks of the program separately... yep! You could renumber starting from a given line number through the end of the program, so in principle you could do a whole-program RENUM and then restore the larger gaps to your GOSUBs: [1]

[1] (what a horrible link) http://www.cpcwiki.eu/index.php/Locomotive_BASIC#RENUM_.5B.E...


Yeah but that was fiddly and scary when the only way to undo any mistakes was to reload your program from cassette.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: