Silverfrost Forums

Welcome to our forums

if (my_iostat/=0) then

17 Mar 2023 8:15 #30044

I know it is a futile question, but still, I am a rooky:

Why the forward slash? I cannot find any answer on the Net.

Nevertheless please tell me.

Zach.

17 Mar 2023 10:21 #30048

You should be able to work it all out from this short program.

program t
implicit none
integer i, j
i = 1
j = 0
!        Six relational operators in Fortran
!        Prints T for true, F for false
print*, (i == j)          ! Test i equal to j
print*, (i /= j)          ! Test i not equal to j
print*, (i >  j)          ! Test i greater than j
print*, (i <  j)          ! Test i less than j
print*, (i >= j)          ! Test i greater than or equal to j
print*, (i <= j)          ! Test i less than or equal to j
print*
!       Equivalent older style (but still valid)
print*, (i .eq. j)        ! Test i equal to j
print*, (i .ne. j)        ! Test i not equal to j
print*, (i .gt. j)        ! Test i greater and j
print*, (i .lt. j)        ! Test i less than j
print*, (i .ge. j)        ! Test i greater than or equal to j
print*, (i .le. j)        ! Test i less than or equal to j
end program t
18 Mar 2023 4:43 #30053

Thank you Kenneth.

Please login to reply.