Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comparation of OS specified files
#3
(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
Reply


Messages In This Thread
Comparation of OS specified files - by ceanwang - 08-31-2020, 02:57 AM
RE: Comparation of OS specified files - by Admin - 08-31-2020, 03:27 AM
RE: Comparation of OS specified files - by ceanwang - 08-31-2020, 03:54 AM
RE: Comparation of OS specified files - by borges - 08-31-2020, 07:43 PM
RE: Comparation of OS specified files - by borges - 08-31-2020, 09:00 PM
RE: Comparation of OS specified files - by Admin - 09-01-2020, 04:45 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)