SWAT (Strategic Weapon Against Typos)
Parchivist (Talk | contribs) (Created page with "{{FormatInfo |subcat=Error detection and correction |released=1982 }} '''SWAT (Strategic Weapon Against Typos)''' by Jon Voskuil and Alan J Zett is a type-in program checker f...") |
MihaiPopa7 (Talk | contribs) |
||
Line 7: | Line 7: | ||
It generates a table with three columns: a range of line numbers, a two-letter 'SWAT Code', and the length (in bytes) of the specified program lines. | It generates a table with three columns: a range of line numbers, a two-letter 'SWAT Code', and the length (in bytes) of the specified program lines. | ||
− | This narrows the area of a bug to no more than twelve lines or no | + | This narrows the area of a bug to no more than twelve lines or no more than about 500-700 bytes of code. |
The 'resolution' of SWAT can be increased for particularly error-prone code. For instance, change "NU=12: B=500" to "NU=5: B=200" to provide a checksum for every 5 lines or 200 bytes of code. | The 'resolution' of SWAT can be increased for particularly error-prone code. For instance, change "NU=12: B=500" to "NU=5: B=200" to provide a checksum for every 5 lines or 200 bytes of code. |
Latest revision as of 12:48, 8 September 2024
SWAT (Strategic Weapon Against Typos) by Jon Voskuil and Alan J Zett is a type-in program checker for Apple II, Atari and TRS-80 used by SoftSide magazine.
It generates a table with three columns: a range of line numbers, a two-letter 'SWAT Code', and the length (in bytes) of the specified program lines.
This narrows the area of a bug to no more than twelve lines or no more than about 500-700 bytes of code.
The 'resolution' of SWAT can be increased for particularly error-prone code. For instance, change "NU=12: B=500" to "NU=5: B=200" to provide a checksum for every 5 lines or 200 bytes of code.
The SWAT Code is generated by adding up the value of every byte in a chunk and then converting to a base-26 number. Just the two rightmost 'digits' (letters) are used. This approach leaves it vulnerable to transposition errors.
[edit] Sample Output
[edit] Links
- SWAT code listing and article (from SoftSide Issue 30 pg 46)
- Updated Atari version (Best of SoftSide Atari Edition pg 139)
- Dissecting Three Classic Automatic Proofreaders