... just "reaffirms" that symbols from module C refer to objects from ... routine, the same symbol is used for different objects at different...But we are talking about MODULE variables which aren't automatic....t invoke one at all. USE has entirely different semantics than...matter how many time you USE the MODULE. The declaration of...entities is done in the MODULE. -- J. Giles "I conclude that...
...| happens if program unit A usesmodule B and C, and module ...my codes since I have a module for data | type declarations which mostly all program units use. I hope that in | the namespace......). Since one name can be used only for one object within the..." just "reaffirms" that symbols from module C refer to objects from module... this as well: PROGRAM A USE C, ONLY: Csymbol, newsymbol1=>CSymbol, ...
... a question came to my mind - what happens if program unit A usesmodule B and C, and module B uses C? Like in program A use B use C ... end program A module B use C ... end module B module C ... end module C This happens pretty often in my codes since I have a module for data type declarations which mostly all program units use. I hope that in the namespace of ...
...be a way, when you USE one module inside another to explicitly declare...His proposed syntax isn't bad:   USE mod1, (private|public) [rename-list] or   USE mod1, (private|public), only: only-list Hi, James, I see...Fortran standard :-) [..] This would be a useful additional control and *could* help ... always be the default for MODULEs and making something PUBLIC should ...
...want to do it like this: | | module B | use C | private :: sub1_C, sub2_C,... | .. | end module B <snip> I also agree with ...: module B PUBLIC ... contains subroutine B_Foo() use C !ONLY recommended but optional here ... you also need C to declare module variables from B, you can explicitly ... by ONLY and PRIVATE symbols: module B use C, ONLY: C_FOO, C_BAR PUBLIC ...
If module C is small, you could declare the entities from ...without having access to any moduleused by B unless explicitly...I thought of that. However, suppose module C is small, and...C are PRIVATE? Something like use C, private which of course...I/O? How can I use print/write statements to debug...The problem is that you use: write(*,*) gamma(real(i)) [..] Tobias...
... be a way, when you USE one module inside another to explicitly declare... proposed syntax isn't bad: USE mod1, (private|public) [rename-list]... here can only be used if the USE statement is in the specification-part of a MODULE. Only one of PRIVATE or ... both. This would be a useful additional control and *could* help ... always be the default for MODULEs and making something PUBLIC should ...
... is dgamma.f from SPECFUN. module md_Global_funcs private ! Make all symbols ... in md_Global_funcs, since main only uses md_Jacobi and not md_Global_funcs. However,... without having access to any moduleused by B unless explicitly ... private public :: sub1_B, sub2_B,... .. end module B otherwise I'll have ... I also hope you are using an ONLY clause for your...
...function is dgamma.f from SPECFUN. module md_Global_funcs  private       ! Make all symbols ... in md_Global_funcs, since main only uses md_Jacobi and not md_Global_funcs. However, ...MRC and found that since md_Jacobi uses md_Global_funcs, then main has access to... without having access to any moduleused by B unless explicitly used by A?  See above. Maybe my ...
...> Is it possible to let a program unit A use a module..., without having access to any moduleused by B unless explicitly ... I thought of that. However, suppose module C is small, and ... C are PRIVATE? Something like use C, private which of course ... I/O? How can I use print/write statements to debug ... The problem is that you use: Â write(*,*) gamma(real(i)) [..] Tobias ...