Skip to content

feat: BASIC line renumber command #18

@acscpt

Description

@acscpt

A new renumber command that renumbers BBC BASIC program lines on a disc image, updating all line-number references to match.

Use case

Line renumbering is a classic BASIC maintenance task. Programs that have grown organically end up with gaps, crowded line numbers, or inconsistent spacing. The Acorn BASIC editor had a built-in RENUMBER command; beebtools should offer the same capability without needing to load the program in an emulator.

Proposed behaviour

beebtools renumber mydisc.ssd T.MYPROG
beebtools renumber mydisc.ssd T.MYPROG --start 100 --step 10

All GOTO, GOSUB, and RESTORE targets are updated to reflect the new line numbers. References to non-existent lines are preserved as-is with a warning.

Works on both DFS and ADFS images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogFor future considerationbasicBBC BASIC relatedcliCommand-line interfaceenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions