home *** CD-ROM | disk | FTP | other *** search
- *******************
-
- FUNCTION Extention
-
- PARAMETERS _afile, _aext
-
- IF PCOUNT() < 2
- RETURN("")
- ELSEIF TYPE("_afile") + TYPE("_aext") != "CC"
- RETURN("")
- ELSEIF LEN(_aext) > 3
- IF LEN(_aext) = 4 .AND. !EMPTY(AT(".", _aext))
- _aext = STRTRAN(_aext, ".", "")
- ELSE
- RETURN("")
- ENDIF
- ENDIF
-
- IF EMPTY(AT(".", _afile))
- RETURN(LTRIM(TRIM(_afile)) + "." + LTRIM(TRIM(_aext)))
- ELSE
- RETURN(LTRIM(TRIM(_afile)))
- ENDIF
-
- * End of File