SWAT (Strategic Weapon Against Typos)

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(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...")
 
 
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 mroe than about 500-700 bytes of code.
+
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

File Format
Name SWAT (Strategic Weapon Against Typos)
Ontology
Released 1982

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

Swat.gif SWAT

Swat-modified parameters.jpg SWAT with modified parameters


[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox