MEGA65 / mega65-rom-public

MEGA65 ROM public issue reporting
4 stars 0 forks source link

RENUMBER should be able to reorder lines #181

Open dansanderson opened 1 week ago

dansanderson commented 1 week ago

Test Environment (required) You can use MEGA65INFO to retrieve this.

Describe the bug

10 A
20 B
30 C
100 D
110 E
120 F
RENUMBER 200,10,10-99

fails with Can't Continue Error.

The reason is unclear. A user might accept that RENUMBER has certain restrictions to prevent it from, say, deleting a line accidentally. And perhaps a user could understand that RENUMBER can't interleave new lines with old ones. But this command is just trying to move a region of lines to the end of the program, which seems like a common use case.

Using an unbounded range works (10-) works, but this is just renumbering everything, not reordering anything. If RENUMBER is incapable of reordering lines, we should at least document this, or rewrite RENUMBER entirely to be more useful.

RENUMBER 50,10,10-99 works, but this request does not reorder the lines.

snoopy-f64 commented 1 week ago

The command is called RENUMBER, not REARRANGE! ;-)