diff options
author | LKedward <laurence.kedward@bristol.ac.uk> | 2020-12-03 15:22:58 +0000 |
---|---|---|
committer | LKedward <laurence.kedward@bristol.ac.uk> | 2020-12-03 15:22:58 +0000 |
commit | 418454ceee23ddd835b4b1a8cd85050ed50d2925 (patch) | |
tree | 070a32ead97e04e3c93bde93c1ce467e0aca8ce7 /example_packages/hello_complex_2/app | |
parent | 0d6a0c50c237617d6ea37436ca65301d77725ad8 (diff) | |
download | fpm-418454ceee23ddd835b4b1a8cd85050ed50d2925.tar.gz fpm-418454ceee23ddd835b4b1a8cd85050ed50d2925.zip |
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.
Diffstat (limited to 'example_packages/hello_complex_2/app')
3 files changed, 9 insertions, 2 deletions
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 |