Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

(fortran) iostat=stat

  1. Sep 21, 2015 #1
    Hello. I am a beginner in the Fortran language and I want to know what isotat=stat means.

    also what is exactly the "buf argument"?
     
  2. jcsd
  3. Sep 21, 2015 #2

    jtbell

    User Avatar

    Staff: Mentor

  4. Sep 21, 2015 #3
    Thanks for the reply.

    if (userdefine==0) then

    open(100,file='COORD.DAT',iostat=stat)
    if(stat==0)then
    read(100,'(a)',iostat=stat)line
    read(100,'(a)',iostat=stat)line
    if ((line(1:2)/='--').and.(line/=' ').and.(line(1:5)/='COORD'))then
     
  5. Sep 21, 2015 #4

    jtbell

    User Avatar

    Staff: Mentor

    Where is the "buf argument"? That's what I was asking about.
     
  6. Sep 21, 2015 #5
    SUBROUTINE ConProdOpt(Iphi_in,Ilnkx_in,Ilnky_in,Ilnkz_in,FirstRun_in,Neindx_in)
    IMPLICIT NONE
    INTEGER,buf ::Iphi_in,Ilnkx_in,Ilnky_in,Ilnkz_in,FirstRun_in

    I saw it everywhere earlier but for some reason I can't find it and now I can only find this one.
     
  7. Sep 21, 2015 #6

    jtbell

    User Avatar

    Staff: Mentor

    The '::' looks like Fortran 90 (or later). I'm not very familiar with those versions of Fortran, so someone else had best answer this part of your question.

    iostat was used in Fortran 77 (possibly earlier) which is what I'm familiar with.
     
  8. Sep 22, 2015 #7
    Ah ok. Thanks anyway
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: (fortran) iostat=stat
  1. Linking Fortran (Replies: 5)

  2. Fortran If help (Replies: 3)

  3. Fortran, is it outdated? (Replies: 75)

Loading...