postnet: USPS POSTNET Barcode Encoding
1 Introduction
2 Encoding
> (digit-list->postnet '(1 2 3 4 5))
(#t #f #f #f #t #t #f #f #t #f #t #f #f #t #t #f |
#f #t #f #f #t #f #t #f #t #f #f #t #f #t #f #t) |
> (char-list->postnet '(#\1 #\2 #\3 #\4 #\5))
(#t #f #f #f #t #t #f #f #t #f #t #f #f #t #t #f |
#f #t #f #f #t #f #t #f #t #f #f #t #f #t #f #t) |
> (string->postnet "12345-6789 01")
(#t #f #f #f #t #t #f #f #t #f #t #f #f #t #t #f |
#f #t #f #f #t #f #t #f #t #f #f #t #t #f #f #t |
#f #f #f #t #t #f #f #t #f #t #f #t #f #f #t #t |
#f #f #f #f #f #f #t #t #f #t #f #f #t #t) |
3 Debugging
> (postnet->debug-string (string->postnet "12345")) "|...||..|.|..||..|..|.|.|..|.|.|"
4 History
- Version 2:0 —
2016-02-28 Moving from PLaneT to new package system.
- Version 1:1 —
2011-08-22 Changed references to Scheme to Racket.
Changed URL.
- Version 1:0 —
2009-03-03 Licensed changed to LGPL 3.
Converted to author’s new Scheme administration system.
Previous version was erroneously in planet as package "postnet-planet.plt".
- Version 0.2 —
2005-07-12 Added Testeez tests.
Minor documentation changes.
- Version 0.1 —
2004-04-14 Wrote as a diversion over dinner.
5 Legal
Copyright 2004, 2005, 2009, 2011, 2016 Neil Van Dyke. This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See http://www.gnu.org/licenses/ for details. For other licenses and consulting, please contact the author.