home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 18.29 Sqz_p()
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
-
- function sqz_p(cPhone)
- LOCAL cBinary,cHold
- cHold := strtran(cPhone,"(","") // Remove various
- cHold := strtran(cHold ,")","") // punctation characters
- cHold := strtran(cHold ,"-","") // ( ) - and space
- cHold := strtran(cHold ," ","")
- cHold := substr(cHold,2,1)+substr(cHold,1,1)+substr(cHold,3,8)
- cBinary := L2bin( val(cHold) )
- return Cbinary
-
- // end of file CHP1829.PRG
-