Page 1 of 1

Auto line numbering?

Posted: Sun Apr 02, 2023 7:59 pm
by EbonHawk
Auto line numbering? If it's been added already, or suggested somewhere already, then forgive me. But a Search didn't turn anything up that I could find.

But a very handy feature in the Commodore Plus/4 VICE emulator that I ran across was auto line numbering when entering BASIC programs.

auto 10
for instance, would make the line number increment by 10s, and you could then start with whatever number you wanted, and the BASIC interpreter would auto-enter the next line number in sequence for you and the cursor would be placed and ready to go..

Re: Auto line numbering?

Posted: Sun Apr 02, 2023 8:14 pm
by Ed Minchau
There's a discussion here:
viewtopic.php?t=6291

Re: Auto line numbering?

Posted: Sun Apr 02, 2023 10:16 pm
by EbonHawk
Isn't that for renumbering an already existing program? I was talking about entering a new program from scratch, and having the line numbers entered for you, in whatever increment you specified, as you went along (and saving a few hundred keystrokes in the process).

Although being able to renumber an existing program would be handy; I wanted something for as I'm entering them the first time.

Re: Auto line numbering?

Posted: Tue Apr 04, 2023 4:42 pm
by kelli217
Sorry, but that command hasn't been implemented. There are a few, shall we say, Level-II TRS-isms in the X16's dialect of CBM BASIC 2.0, it's true, such as CLS and PSET, but that isn't one of them.

Re: Auto line numbering?

Posted: Wed Apr 05, 2023 5:53 pm
by mobluse
I thought CLS and PSET came from GW-BASIC that also has AUTO:
http://www.antonis.de/qbebooks/gwbasman/auto.html

GW-BASIC:
http://www.antonis.de/qbebooks/gwbasman/

I believe the original idea for X16 was that one should have an editor for BASIC that translates code without line numbers, but with labels, to X16 BASIC v2 when running or saving. BASIC v2 should more be some byte code.

Re: Auto line numbering?

Posted: Wed Apr 05, 2023 10:08 pm
by kelli217
Yes... TRS-80 Level-II BASIC shares a lot of common elements with the various PC BASICs. Similar heritage and comparable processor architecture. The TRS dialect is the first one I learned, and it did happen to come out before the IBM PC did, so that's just my own internal default comparison point. YMMV. :D

Re: Auto line numbering?

Posted: Sat Apr 08, 2023 1:16 pm
by mobluse
GWBASIC (8088/8086) stems from MBASIC for CP/M (8080) which stems from Altair BASIC (8080). A descendant from MBASIC is MSX BASIC (Z80): https://github.com/Konamiman/MSX2-Techn ... apter2.md/

These new commands or functions in X16 BASIC v2 R42 compared to C64/VIC20 BASIC v2 are also in MSX2 BASIC:
VPOKE, SCREEN, PSET, LINE, COLOR, CLS, LOCATE, BLOAD, BSAVE, VPEEK(), HEX$(), BIN$(), but some of them don't have the same arguments as in MSX BASIC.

TRS-80 Level II BASIC (Z80) was also written by Microsoft.

My first programming languages were ABC80 (Z80) and ZX81 BASIC (Z80) (mostly ZX81 since I owned that and I only used the ABC 80 in school, but I spent some weekends in school, programming). These BASICs didn't descend from any MS BASIC.

I think AUTO is not necessary if X16 has a smart editor for BASIC with labels that generates linenumbers, but MSX2 BASIC has AUTO.