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

  1. /*
  2.    Listing 20.2  Formalize()
  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. //───── NOTE: must compile with the /N option!
  12.  
  13. function Formalize(sname)
  14. LOCAL jj, one_char, upcase:=.t.
  15. for jj=1 to len(sname)
  16.    one_char := substr(sname,jj,1)
  17.    if upcase .and. islower(one_char)
  18.       sname := stuff(sname,jj,1,upper(one_char))
  19.       upcase :=.f.
  20.    endif
  21.    upcase := ( one_char == " " )
  22. next
  23. return retval
  24.  
  25. // end of file CHP2002.PRG
  26.