home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST329.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  526 b   |  26 lines

  1. *******************
  2.  
  3. FUNCTION Extention
  4.  
  5.    PARAMETERS _afile, _aext
  6.  
  7.    IF PCOUNT() < 2
  8.       RETURN("")
  9.    ELSEIF TYPE("_afile") + TYPE("_aext") != "CC"
  10.       RETURN("")
  11.    ELSEIF LEN(_aext) > 3
  12.       IF LEN(_aext) = 4 .AND. !EMPTY(AT(".", _aext))
  13.          _aext = STRTRAN(_aext, ".", "")
  14.       ELSE
  15.          RETURN("")
  16.       ENDIF
  17.    ENDIF
  18.  
  19.    IF EMPTY(AT(".", _afile))
  20.       RETURN(LTRIM(TRIM(_afile)) + "." + LTRIM(TRIM(_aext)))
  21.    ELSE
  22.       RETURN(LTRIM(TRIM(_afile)))
  23.    ENDIF
  24.  
  25. * End of File
  26.