c c subroutine namfil (namstr,ext) c c PROGRAM NAME: NAMFIL.rat c c DATE OF FIRST VERSION: 1-Dec-79 c DATE OF CURRENT VERSION: 21-Jun-83 c c PURPOSE: To ask for and recieve a file name from the c console terminal. c c USAGE: call NAMFIL (NAMSTR,EXT) c c Where NAMSTR -- String to put file name into c EXT -- Default extension c c PROGRAMMER: Mike Collins / Eric Javel c c**************************************************************** bytenamstr(1), ext(1) logical*1err external len,index c c---------------------------------------------------------------- c 1 write (5,2) (ext(i),i=1,4) 2 format('$Enter FILE NAME [Default Extension: ',4a1,'] -- ') call getstr (5,namstr,24,err) if(.not.(err .or. len(namstr).le.0))goto 23000 goto 1 c If no file extension exists and a default exists, add the default to NAMSTR 23000 continue if(.not.(index(namstr,'.').eq.0 .and. ext(1).ne.0))goto 23002 call scopy(ext,namstr(len(namstr)+1)) 23002 continue return end