forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File Assignment

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
stfark1



Joined: 02 Sep 2008
Posts: 210

PostPosted: Thu Nov 19, 2009 7:18 pm    Post subject: File Assignment Reply with quote

I Installed Windows 7, am using SilverFrost Fortran. The input file I want to access is loaded under Windows 7 as Disk Address "F:" When I issue the fortran statement:
OPEN (UNIT=5, FILE = 'F:\Fortran\FORTRAN\BINB\CONSOLEIN.txt') , I get a run time error "cannot find the path requested". Any ideas? Sid Kraft
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Fri Nov 20, 2009 2:03 am    Post subject: Reply with quote

Why not try "get_filtered_file@" to see what is available. My example file searcher that works on XP is below.
Code:
   subroutine select_file (file_name, project)
   use mswin
!
   character (len=*) :: file_name
   character (len=*) :: project
!
   integer :: number_of_filters, i
   logical :: must_exist
!
   character (len=128)              :: path
   character (len=15),dimension (5) :: filter_names
   character (len=10),dimension (5) :: filters
   character (len=20)               :: title
!
   path              = 'c:\temp'
!
   title             = 'New Project File'
   file_name         = ' '
   number_of_filters = 4
   filter_names(1)   = 'Data files'    ; filters(1) = '*.dat'
   filter_names(2)   = 'Text files'    ; filters(2) = '*.txt'
   filter_names(3)   = 'Fortran files' ; filters(3) = '*.f95'
   filter_names(4)   = 'All files'     ; filters(4) = '*.*'
   must_exist        = .true.
!
   call get_filtered_file@ (title, file_name, path, &
                            filter_names, filters, number_of_filters, must_exist)
!
   i = index (file_name, '\', .true.)
   if (i > 0 .and. len_trim(project) > 1) then
      path = file_name(1:i)
      call use_path_name (path, 'SET', Project)
   end if
!
   write (*,*) 'Project: ', project
   write (*,*) 'Title  : ', title
   write (*,*) 'Path   : ', path
   write (*,*) 'File   : ', file_name
!
   end subroutine select_file
 
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group