From 418454ceee23ddd835b4b1a8cd85050ed50d2925 Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 3 Dec 2020 15:22:58 +0000 Subject: 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. --- example_packages/hello_complex_2/app/say_hello/app_extra_mod.f90 | 6 ++++++ example_packages/hello_complex_2/app/say_hello/app_hello_mod.f90 | 1 + example_packages/hello_complex_2/app/say_hello/say_Hello.f90 | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 example_packages/hello_complex_2/app/say_hello/app_extra_mod.f90 (limited to 'example_packages') diff --git a/example_packages/hello_complex_2/app/say_hello/app_extra_mod.f90 b/example_packages/hello_complex_2/app/say_hello/app_extra_mod.f90 new file mode 100644 index 0000000..5059e22 --- /dev/null +++ b/example_packages/hello_complex_2/app/say_hello/app_extra_mod.f90 @@ -0,0 +1,6 @@ +module app_extra_mod +implicit none + +character(len=5) :: greet_object = "World" + +end module app_extra_mod diff --git a/example_packages/hello_complex_2/app/say_hello/app_hello_mod.f90 b/example_packages/hello_complex_2/app/say_hello/app_hello_mod.f90 index c5795cb..e44edd7 100644 --- a/example_packages/hello_complex_2/app/say_hello/app_hello_mod.f90 +++ b/example_packages/hello_complex_2/app/say_hello/app_hello_mod.f90 @@ -1,4 +1,5 @@ module app_hello_mod +use app_extra_mod, only: greet_object implicit none integer :: hello_int = 42 diff --git a/example_packages/hello_complex_2/app/say_hello/say_Hello.f90 b/example_packages/hello_complex_2/app/say_hello/say_Hello.f90 index 3b69ba7..3ebaebb 100644 --- a/example_packages/hello_complex_2/app/say_hello/say_Hello.f90 +++ b/example_packages/hello_complex_2/app/say_hello/say_Hello.f90 @@ -1,8 +1,8 @@ program say_Hello use greet_m, only: make_greeting - use app_hello_mod + use app_hello_mod, only: greet_object implicit none - print *, make_greeting("World") + print *, make_greeting(greet_object) end program say_Hello -- cgit v1.2.3