A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
10
Task/Function-definition/Fortran/function-definition-3.f
Normal file
10
Task/Function-definition/Fortran/function-definition-3.f
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
program funcDemo
|
||||
use elemFunc
|
||||
|
||||
real :: a = 20.0, b = 30.0, c
|
||||
real, dimension(5) :: x = (/ 1.0, 2.0, 3.0, 4.0, 5.0 /), y = (/ 32.0, 16.0, 8.0, 4.0, 2.0 /), z
|
||||
|
||||
c = multiply(a,b) ! works with either function definition above
|
||||
|
||||
z = multiply(x,y) ! element-wise invocation only works with elemental function
|
||||
end program funcDemo
|
||||
Loading…
Add table
Add a link
Reference in a new issue