A new lint command that reports broken line-number references in a BBC BASIC program on a disc image.
Use case
Programs acquired from disc archives often have broken GOTO, GOSUB, or RESTORE references - from editing accidents, incomplete transfers, or line renumbering that missed some targets. Finding these by hand means reading through the entire listing. A lint check identifies them instantly, before the program is loaded into an emulator.
Proposed behaviour
beebtools lint mydisc.ssd T.MYPROG
Reports any GOTO, GOSUB, or RESTORE targets that point to lines which do not exist in the program. Exits with a non-zero status if any broken references are found, making it suitable for scripting.
Works on both DFS and ADFS images.
A new
lintcommand that reports broken line-number references in a BBC BASIC program on a disc image.Use case
Programs acquired from disc archives often have broken GOTO, GOSUB, or RESTORE references - from editing accidents, incomplete transfers, or line renumbering that missed some targets. Finding these by hand means reading through the entire listing. A lint check identifies them instantly, before the program is loaded into an emulator.
Proposed behaviour
Reports any GOTO, GOSUB, or RESTORE targets that point to lines which do not exist in the program. Exits with a non-zero status if any broken references are found, making it suitable for scripting.
Works on both DFS and ADFS images.