Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Page 604

JohnNichols
Valued Contributor III
602 Views

@Barbara_P_Intel 

 

It took me a while to find the changes, Intel has taken about 50 of the first 600 pages out of the manual, it appears to me. I could be wrong, but I think not. 

On the new page 604, the sample does not run and does not really show a newby what to do, the following is not a solution, it is a thought for comment, it needs fixing,  but it is a start.  

 

 Program start
    implicit none
    byte i,j,k
    character*1 l
    real X,Y,A,B
    logical ok

    i = 1
    write(*,*)i
    inquire(FILE="A.TXT", EXIST=ok)
    write(*,*)ok
    if(ok) then
    write(*,*)"It exists"
         OPEN (UNIT=12, NAME = "A.TXT", ACCESS='STREAM')
        READ (12) i! start at the first byte of the file
        
    write(*,*)i
      !  write(*,*)I,J,K
      !  READ (12, POS=200) X, Y ! then read staring at byte 200
      !  READ (12) A, B ! then read starting where the previous READ stopped
    else
        write(*,*)"Failure"
    endif
    end program start

 

 

I think you should give a sample for A.TXT, but so far I have only 1 in it and it returns 49 as expected. 

I am looking for suggestions.  I know I have to fix the reals, at the moment Hebe is in the road and that is actually important, this is just fun. 

 

JMN 

0 Kudos
1 Reply
Barbara_P_Intel
Employee
530 Views

Thank you, @JohnNichols. Need to write a file before it can be read. Could be done in the same code sample. Definitely needs some work.

 

0 Kudos
Reply