PROGRAM OPTST integer, parameter :: MAXFILTER = 10 character (len=60) :: msg, dir, pathfile type s_filt character (len=40) :: desc, mask end type s_filt type (s_filt) :: filt(MAXFILTER) logical :: readonly ! ! Demonstration of Microsoft Windows(tm) Common Dialog calling ! for Lahey/Fujitsu LF95 v5.70 ! Kenneth G. Hamilton, June 2002. ! msg = 'Please Supply the Input File Name' ! Message for box top dir = ' ' ! Path to look in nfilt = 8 ! Number of filters below ! ! Each file name "filter" consists of an ASCII description, ! and a wildcard definition, as shown below. ! These data appear in the drop-down list at the bottom of ! the dialog box, where they can be used to display only ! certain types of files. ! filt(1)%desc = 'All Fortran source (*.for;*.f90;*.f)' filt(1)%mask = '*.for;*.f90;*.f' filt(2)%desc = 'Fixed-form Fortran (*.for) ' filt(2)%mask = '*.for' filt(3)%desc = 'Free-form Fortran (*.f90)' filt(3)%mask = '*.f90' filt(4)%desc = 'Unixlike Fortran (*.f)' filt(4)%mask = '*.f' filt(5)%desc = 'Assembly source (*.asm)' filt(5)%mask = '*.asm' filt(6)%desc = 'Object modules (*.obj)' filt(6)%mask = '*.obj' filt(7)%desc = 'Data files (*.dat)' filt(7)%mask = '*.dat' filt(8)%desc = 'All files (*.*)' filt(8)%mask = '*.*' ! call getinpfilename(msg, dir, nfilt, filt, pathfile, readonly) print 50, pathfile, readonly 50 format (' Subroutine returned the name: ',A/' Readonly = ',L5) ! msg = 'Please Supply the Output File Name' call getoutfilename(msg, dir, nfilt, filt, pathfile, readonly) print 50, pathfile, readonly ! stop end