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

  1. /*
  2.    Listing 18.30  Unsqz_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 unsqz_p(cBinary)
  13. LOCAL cPhone,nHold,cHold
  14. nHold  :=Bin2l(cBinary)
  15. cHold  :=Alltrim(str(nhold,11))
  16. cHold  :=if(len(cHold)<>10,"0"+cHold,cHold)
  17. cPhone :="("+substr(cHold,2,1)+substr(cHold,1,1)+;
  18.         substr(cHold,3,1)+") "+substr(cHold,4,3)+;
  19.         "-"+substr(cHold,7,4)
  20. return cPhone
  21.  
  22. // end of file CHP1830.PRG
  23.