- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to make accessible a including module of a module.
if i define
module my_module
use my_module_def
integer, private param1
integer, public param2
then in a subroutine/module where I use my_module, also my_module_def is accessible
but if I define
module my_module
use my_module_def
private
integer param1
integer, public param2
...
then it's not.
Is there an other way to make the module my_module_def accessible ? "public :: use FILE_IO_DEF" is not possible
if i define
module my_module
use my_module_def
integer, private param1
integer, public param2
then in a subroutine/module where I use my_module, also my_module_def is accessible
but if I define
module my_module
use my_module_def
private
integer param1
integer, public param2
...
then it's not.
Is there an other way to make the module my_module_def accessible ? "public :: use FILE_IO_DEF" is not possible
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Modules are not public or private. What the private statement does is change the "default accessibility" for symbols in that scope. You can add PUBLIC for specific symbols you want to be visible from my_module_def in my_modile and that will work. Otherwise, for users of my_modules, all symbols are inaccessible other than the ones you explicitly make public.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page