08-31-2020, 03:54 AM
(08-31-2020, 03:27 AM)Admin Wrote: So the idea is to make a common set of files so they are not OS specific?Yes.
Just did a test. Windows 10 now accept both / and \ as directory separator. So GET_MYSTRAN_DIR.f90 doesn't need two versions.
Code:
program check_dir_sep
implicit none
integer :: i, ierr, n
open(19,file='d:/00master/1/test_open.txt', iostat=ierr, form='formatted', status='replace')
!open(19,file='d:\00master\1\test_open.txt', iostat=ierr, form='formatted', status='replace')
if (ierr == 0) then
do i=1,10
write(19,'(A,I4)') ' #1: Hello, number ', i
enddo
else
write(*,'(A,I8)') ' Stopping due to error opening file with IERR = ', IERR
endif
close (19,iostat=ierr,status='keep')
end program check_dir_sep