4 ms·
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,
by Doctor_Fegg 3y 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
- rahimnathwani 3y agoIIRC BBC BASIC let you choose the renumber increment, but the ZX Spectrum didn't.
- Baldbvrhunter 3y agoFor approved choices :) > AUTO10,1000 Silly > _
- rahimnathwani 3y agoWow 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.
- ikari_pl 3y agoIsn't it because the line number is 16-bit unsigned int?
- rahimnathwani 3y agoGreat 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 ...
- ikari_pl 3y agoThis 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).
- rahimnathwani 3y agoI no longer have an Acorn Electron, but using ElkJS (https://elkjs.azurewebsites.net/ https://elkjs.azurewebsites.net/) I did: >0 REM >10 REM >RENUMBER 32767,1 >LIST 32767 REM 0 REM >0 REM >LIST 0 REM 32767 REM 0 REM
- rahimnathwani 3y agoI asked a friend to test this on a real Acorn Electron. It behaved the same. He also found some more info from the web and by trying stuff out: Hey, I confirmed this is the same on the actual machine so yep it looks like this was part of the ROM. I found a small amount of info, including that the maximum actual line number is 65279 (BBC BASIC V file format — Matt Godbolt’s blog (xania.org). It looks like the BASIC editor only properly dealt with lines up to 32767 (0x7FFF), including ANDing them with that when using LIST! Weird things happen if you have a program with line numbers beyond 32767. LIST shows the wrong line numbers, RENUMBER doesn't renumber GOTOs properly.
- eterps 3y agoMSX supported that as well
- gsliepen 3y agoLocomotive 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.