mit neuen venv und exe-Files
This commit is contained in:
@@ -0,0 +1 @@
|
||||
real(8) b, n, m
|
||||
@@ -0,0 +1,26 @@
|
||||
SUBROUTINE TESTSUB(
|
||||
& INPUT1, INPUT2, !Input
|
||||
& OUTPUT1, OUTPUT2) !Output
|
||||
|
||||
IMPLICIT NONE
|
||||
INTEGER, INTENT(IN) :: INPUT1, INPUT2
|
||||
INTEGER, INTENT(OUT) :: OUTPUT1, OUTPUT2
|
||||
|
||||
OUTPUT1 = INPUT1 + INPUT2
|
||||
OUTPUT2 = INPUT1 * INPUT2
|
||||
|
||||
RETURN
|
||||
END SUBROUTINE TESTSUB
|
||||
|
||||
SUBROUTINE TESTSUB2(OUTPUT)
|
||||
IMPLICIT NONE
|
||||
INTEGER, PARAMETER :: N = 10 ! Array dimension
|
||||
REAL, INTENT(OUT) :: OUTPUT(N)
|
||||
INTEGER :: I
|
||||
|
||||
DO I = 1, N
|
||||
OUTPUT(I) = I * 2.0
|
||||
END DO
|
||||
|
||||
RETURN
|
||||
END
|
||||
@@ -0,0 +1,5 @@
|
||||
C This is an invalid file, but it does compile with -ffixed-form
|
||||
subroutine mwe(
|
||||
& x)
|
||||
real x
|
||||
end subroutine mwe
|
||||
@@ -0,0 +1,9 @@
|
||||
SUBROUTINE TESTSUB(INPUT1, & ! Hello
|
||||
! commenty
|
||||
INPUT2, OUTPUT1, OUTPUT2) ! more comments
|
||||
INTEGER, INTENT(IN) :: INPUT1, INPUT2
|
||||
INTEGER, INTENT(OUT) :: OUTPUT1, OUTPUT2
|
||||
OUTPUT1 = INPUT1 + &
|
||||
INPUT2
|
||||
OUTPUT2 = INPUT1 * INPUT2
|
||||
END SUBROUTINE TESTSUB
|
||||
@@ -0,0 +1,5 @@
|
||||
function add(n,m) result(b)
|
||||
implicit none
|
||||
include 'AB.inc'
|
||||
b = n + m
|
||||
end function add
|
||||
@@ -0,0 +1,9 @@
|
||||
! Check that intent(in out) translates as intent(inout).
|
||||
! The separation seems to be a common usage.
|
||||
subroutine foo(x)
|
||||
implicit none
|
||||
real(4), intent(in out) :: x
|
||||
dimension x(3)
|
||||
x(1) = x(1) + x(2) + x(3)
|
||||
return
|
||||
end
|
||||
Reference in New Issue
Block a user