|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Zach
Joined: 13 Mar 2023 Posts: 85 Location: Groningen, Netherlands
|
Posted: Fri Mar 17, 2023 9:15 pm Post subject: if (my_iostat/=0) then |
|
|
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. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 711 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Fri Mar 17, 2023 11:21 pm Post subject: |
|
|
You should be able to work it all out from this short program.
Code: |
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 |
|
|
Back to top |
|
|
Zach
Joined: 13 Mar 2023 Posts: 85 Location: Groningen, Netherlands
|
Posted: Sat Mar 18, 2023 5:43 pm Post subject: |
|
|
Thank you Kenneth. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|