3 ms·
I always thought it would be cool if the line numbers were floating point. You could always insert a line between any existing ones then.
by jhallenworld 5y ago
I always thought it would be cool if the line numbers were floating point. You could always insert a line between any existing ones then.
- adrianmonk 5y agoI'm pretty sure Netflix queues used to work this way. For the DVD-by-mail service, I think. Basically, the web page had a text field next to each movie, and you could type in numbers, then submit a form, and it would reorder your queue. The obvious thing to do was swap "1" and "2" to flip the order of the top two items. But you could just set the second one to "0.5" and leave the first at "1". When you submitted the form, it would renumber them all with integers.
- nl 5y agoThis is why everyone use 10, 20 etc. I think I remember there was a Renumber command that would reset any inserted numbers too?
- guyzero 5y agoThere were BASIC extensions you could get that added renumber. The C128 had renumber as a builtin.
- timbit42 5y agoThat would be JOSS or FOCAL: https://en.wikipedia.org/wiki/JOSS https://en.wikipedia.org/wiki/JOSS https://en.wikipedia.org/wiki/FOCAL_(programming_language) https://en.wikipedia.org/wiki/FOCAL_(programming_language)
- rbanffy 5y agoWe could add an imaginary part to line numbers. If you do a GOTO 200 + 20i, you’ll jump to a line that’s above the program in the imaginary axis and continue running from there.
- classichasclass 5y agoWith FOCAL, though, they were more like modules rather than floating point values; you could address blocks of code ("groups") by, for lack of a better expression, the integer portion of the number, with the fractional portion being the line number within that group.