Last active
November 13, 2017 11:08
-
-
Save zrhans/ff354f20215a639d31d5b192a2a79056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program calling_func | |
implicit none | |
real :: x, y, z, disc | |
x= 1.0 | |
y = 5.0 | |
z = 2.0 | |
call intent_example(x, y, z, disc) | |
Print *, "O valor do discriminante vale" | |
Print *, disc | |
end program calling_func | |
subroutine intent_example (a, b, c, d) | |
implicit none | |
! dummy arguments | |
real, intent (in) :: a | |
real, intent (in) :: b | |
real, intent (in) :: c | |
real, intent (out) :: d | |
d = b * b - 4.0 * a * c | |
end subroutine intent_example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment