We are using your 'Filter.f95' program and get the same problem.
!****************************************************************************
!* *
!* Salford ClearWin+ Example Code *
!* *
!* filter.f95 - version 1.0 29/6/99 *
!* *
!* Example of ClearWin+ get_filtered_file routine *
!* *
!* only compile using FTN95 version 1.6 or higher *
!* *
!****************************************************************************
!* *
!* Illustrates the use of the function GET_FILTERED_FILE@ to obtain a *
!* filename from the user. *
!* *
!****************************************************************************
winapp
program filter
use mswin
integer :: res, select_file
external select_file
res = winio@('%ca[Filtered File Example]&')
res = winio@('%sy[thin_border]&')
res = winio@('%bg[BTNFACE]&')
res = winio@('%ob[raised]&')
res = winio@('This program illustrates the use of%ff&')
res = winio@('the function GET_FILTERED_FILE@.%ff&')
res = winio@('Use the buttons to make your choice%ff%nl&')
res = winio@('Note: that under WIN32 you will get the%ff&')
res = winio@('enhanced dialog box.%cb%ff%nl&')
res = winio@('%`^tt[&select file]%ff&', select_file)
res = winio@('%tt[&Exit]')
end program filter
!****************************************************************************
!* *
!* Callback function that calls get_filtered_file@ to display the standard *
!* 'open file' window *
!* *
!****************************************************************************
integer function select_file()
use mswin
integer :: res, number_of_filters
logical :: must_exist
character(len=128),dimension (10) :: filter_names, filters
character(len=128) :: file_name,path
character (len=20) :: title
common / pdata / title, file_name, path, filter_names, filters,&
& number_of_filters, must_exist
data ifirst / 1 /
if (ifirst.eq.1) then
ifirst = 0
title = 'select_file File'
path = 'c:\\surveys\\testdata\\example survey - finished'
file_name = 'fred.txt'
filter_names = ' '
filter_names(1) = 'Text files'
filter_names(2) = 'Batch files'
filter_names(3) = 'All files'
filters = ' '
filters(1) = '*.txt'
filters(2) = '*.bat'
filters(3) = '*.*'
number_of_filters = 3
must_exist = .true.
endif
write(,) ' pre '
write(,) 'title = ', title(1:leng(title))
write(,) 'file_name = ', file_name(1:leng(file_name))
write(,) 'path = ',path(1:leng(path))
write(,) 'number_of_filters = ', number_of_filters
do i = 1, number_of_filters
[color=red:fb13fd2d74]contd...[/color:fb13fd2d74]