Skip to content

Commit 418454c

Browse files
committed
Update example package for indirect module use
Update hello_complex_2 example package to add a non-library module that is indirectly used by an app in the same directory.
1 parent 0d6a0c5 commit 418454c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module app_extra_mod
2+
implicit none
3+
4+
character(len=5) :: greet_object = "World"
5+
6+
end module app_extra_mod

example_packages/hello_complex_2/app/say_hello/app_hello_mod.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module app_hello_mod
2+
use app_extra_mod, only: greet_object
23
implicit none
34

45
integer :: hello_int = 42
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
program say_Hello
22
use greet_m, only: make_greeting
3-
use app_hello_mod
3+
use app_hello_mod, only: greet_object
44

55
implicit none
66

7-
print *, make_greeting("World")
7+
print *, make_greeting(greet_object)
88
end program say_Hello

0 commit comments

Comments
 (0)