X16Community / x16-rom

Other
46 stars 27 forks source link

Feature Request: RENUMBER command #78

Closed tomxp411 closed 1 year ago

tomxp411 commented 1 year ago

From the forums https://cx16forum.com/forum/viewtopic.php?p=26511#p26511

Suggested syntax (based on GW-BASIC):

RENUMBER [<new>[, <old>[, <increment>]]]

new defaults to 10.

old defaults to the first line of the program

increment defaults to 10


I would love to see the Basic language in ROM somehow get a renumber command similar to the command of the same name in the Commodore 128/plus4. Coding long complex Basic programs is a lot easier (using the interactive coding style basic allows) to write if the lines can be renumbered on the fly. Also, I have tried a RENUM utility found else where on this forum, but it doesn't seem to work on v42.

mobluse commented 1 year ago

If it has the same arguments and order as RENUM in GW-BASIC I think it would be better if it had the same name as in GW-BASIC i.e. RENUM. See https://hwiegman.home.xs4all.nl/gw-man/RENUM.html or https://github.com/Konamiman/MSX2-Technical-Handbook/blob/master/md/Chapter2.md/ RENUM [<new>[, <old>[, <increment>]]]

But if it has the same arguments and order as RENUMBER in C128 BASIC v7 it would be better if it was called RENUMBER. Search for RENUMBER in https://www.pagetable.com/docs/Commodore%20128%20Programmer's%20Reference%20Guide.pdf RENUMBER [<new>[, <increment>[, <old>]]]

I prefer the RENUMBER order of arguments since this is more useful and probably simpler to implement, because you don't need to allow for empty arguments, and initially you could skip implementing <old> if that is difficult to implement in a bug free way.

It would be confusing for old C128 programmers if the command was called RENUMBER, but didn't have the same argument order.

The abbreviated command in Commander X16 BASIC v2 would probably be the same whichever name you choose.

In Luxor ABC80 BASIC RENUMBER was called REN and didn't support <old>. See p. 46 in https://www.abc80.net/archive/luxor/ABC80/ABC80-bruksanvisning.pdf (in Swedish) REN [<new>[, <increment>]]