fork download
  1.  
  2. interface
  3. implicit none
  4. subroutine swap(x,y)
  5. real, intent(inout):: x,y,c
  6. end interface
  7.  
  8.  
  9.  
  10. program swapping
  11.  
  12. implicit none
  13.  
  14. real ,intent(inout):: a,b
  15. read*, a,b
  16. call swap(a,b)
  17. print*, a,b
  18. end program swapping
  19.  
  20.  
  21. subroutine swap(x,y)
  22. implicit none
  23. real,intent(inout)::x,y,c
  24. c=x
  25. x=y
  26. y=x
  27. end subroutine swap
  28.  
  29.  
  30.  
  31.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
5
3
compilation info
prog.f95:3.13:

implicit none
             1
Error: Unexpected IMPLICIT NONE statement in INTERFACE block at (1)
prog.f95:6.3:

end interface 
   1
Error: Expecting END SUBROUTINE statement at (1)
prog.f95:10.16:

program swapping
                1
Error: Unexpected PROGRAM statement at (1) in INTERFACE body
prog.f95:15.10:

read*, a,b
          1
Error: Unexpected READ statement at (1) in INTERFACE body
prog.f95:16.14:

call swap(a,b)
              1
Error: Unexpected CALL statement at (1) in INTERFACE body
prog.f95:17.11:

print*, a,b
           1
Error: Unexpected WRITE statement at (1) in INTERFACE body
prog.f95:18.3:

end program swapping
   1
Error: Expecting END SUBROUTINE statement at (1)
prog.f95:21:

subroutine swap(x,y)
1
Error: Unclassifiable statement at (1)
prog.f95:22.13:

implicit none
             1
Error: Duplicate IMPLICIT NONE statement at (1)
prog.f95:23.21:

real,intent(inout)::x,y,c
                     1
Error: Symbol 'x' at (1) already has basic type of REAL
prog.f95:24.3:

c=x
   1
Error: Unexpected assignment statement at (1) in INTERFACE body
prog.f95:25.3:

x=y
   1
Error: Unexpected assignment statement at (1) in INTERFACE body
prog.f95:26.3:

y=x
   1
Error: Unexpected assignment statement at (1) in INTERFACE body
Error: Unexpected end of file in 'prog.f95'
stdout
Standard output is empty