/*--- XPROPER - MS/PCDOS/DOSBOX/Unix/Linux - 2005 - Mark McDonald ----*/
/* XPROPER(string)                                                    */
/*   Returns a string with 1st character upper and rest lower         */
/*   Words will be delimited by one space                             */
/*   Returned string will be striped                                  */
/*--------------------------------------------------------------------*/
   XPROPER:  PROCEDURE
     PARSE ARG X
     NWRDS = 0
     CNT = 0
     XR = ""
     T = ""
     NWRDS = WORDS(X)
     DO CNT = 1 TO NWRDS
       T = WORD(X,CNT)
       T = TRANSLATE(T,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
       XR = XR""TRANSLATE(LEFT(T,1))""RIGHT(T,LENGTH(T)-1)" "
     END
     XR = LEFT(XR,LENGTH(XR)-1)
   RETURN (XR)