SUBROUTINE CHECKF(FILN) C This utility subprogram will determine if the user C typed in a valid filename. Later this will have more C sophiticated checks for filenames. C CHECKF declarations BYTE FILN(12),EXT(6) INTEGER P C CHECKF code P=INDEX(FILN,'.') IF(P .EQ. 0) GOTO 5 CALL SEG(FILN,EXT,P+1,P+3) IF(ISCOMP(EXT,'MAC') .EQ. 0) GOTO 12 RETURN C Extract the extension of the filename. If no '.' C was found, ERROR . Then determine if .MAC was inputed. C If so, ERROR we do not allow an Mac extention. 5 CALL CONCAT(FILN,'.SMA',FILN) IF(LEN(FILN) .LE. 10) RETURN C Add the '.sma' default extention TYPE *,'Syntax error in expression' CALL EXIT 12 TYPE *,'A Mac extention is not allowed' CALL EXIT END