home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP18.EXE / CHP1829.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  668 b   |  23 lines

  1. /*
  2.    Listing 18.29  Sqz_p()
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11.  
  12. function sqz_p(cPhone)
  13. LOCAL cBinary,cHold
  14. cHold := strtran(cPhone,"(","")    // Remove various
  15. cHold := strtran(cHold ,")","")    // punctation characters
  16. cHold := strtran(cHold ,"-","")    // ( ) - and space
  17. cHold := strtran(cHold ," ","")
  18. cHold := substr(cHold,2,1)+substr(cHold,1,1)+substr(cHold,3,8)
  19. cBinary := L2bin( val(cHold) )
  20. return Cbinary
  21.  
  22. // end of file CHP1829.PRG
  23.