Hacker News new | ask | show | jobs
by Doctor_Fegg 908 days ago
Amstrad CPC (Locomotive BASIC) and the BBC Micro both had it. In the CPC implementation, at least, you could choose the starting line number and the increment, e.g. RENUM 100,5
3 comments

IIRC BBC BASIC let you choose the renumber increment, but the ZX Spectrum didn't.
For approved choices :)

> AUTO10,1000

Silly

> _

Wow I just tried this out on an Electron emulator. It seems like the second parameter for RENUMBER is limited to a byte (255).

The first parameter is weird, though: if you put in a number that's too large, the system reports a syntax error. 10000,255 works, but 50000,255 doesn't.

Isn't it because the line number is 16-bit unsigned int?
Great clue. Thanks!

RENUMBER takes maximum parameters of 32767 and 255.

But line numbers wrap! So if you do RENUMBER 32767,1 then your line numbers will go:

  32767
  0
  1
  2
  ...
This is even more interesting, 32767 is the max signed 16-bit int. And it wouldn't wrap to 0 after that for sure.

Btw does it allow 0? Amstrad's BASIC does not (oficially).

Locomotive BASIC was also a very good BASIC implementation. I wrote a multiplayer game with background music in it, without having to resort to any PEEKs or POKEs like you would on a Commodore 64.
MSX supported that as well