Re: Strange behavior using a module which uses another module
- From: deltaquattro <deltaquattro@xxxxxxxxx>
- Date: Thu, 31 Jul 2008 10:04:41 -0700 (PDT)
On 31 Lug, 18:45, Tobias Burnus <bur...@xxxxxxxx> wrote:
On Jul 31, 6:27 pm, deltaquattro <deltaquat...@xxxxxxxxx> wrote:[..]
Is it
possible to let a program unit A use a module B, without having access
to any module used by B unless explicitly used by A?
module B
use C
private
public :: B_subroutine1, B_subroutine2, B_global_var1, B_type
Yes, I thought of that. However, suppose module C is small, and module
B is very big. Then, by defaulting all entities in B to PRIVATE, I'll
have to write a very long PUBLIC list for all entities defined in B,
just to make PRIVATE the few entities which B imports by host
association from C. Worse, each time I define another entity in B,
I'll have to remember to add it in the PUBLIC :: list, thus increasing
the chances of an error. Isn't there a way to say that only the
entities defined in C are PRIVATE? Something like
use C, private
which of course doesn't work.
[..]2) compiling with EFC, I get the following error:
forrtl: severe (40): recursive I/O operation, unit -1, file unknown
due to the "write" instruction in lgamma. Why is the compiler
complaining about a recursive I/O? How can I use print/write
statements to debug my libraries without incurring in this error?
The problem is that you use:
write(*,*) gamma(real(i))
Tobias
Excellent, your explaination was really clear.
Best Regards,
deltaquattro
.
- References:
- Strange behavior using a module which uses another module
- From: deltaquattro
- Re: Strange behavior using a module which uses another module
- From: Tobias Burnus
- Strange behavior using a module which uses another module
- Prev by Date: Re: Strange behavior using a module which uses another module
- Next by Date: Re: Strange behavior using a module which uses another module
- Previous by thread: Re: Strange behavior using a module which uses another module
- Next by thread: Re: Strange behavior using a module which uses another module
- Index(es):
Relevant Pages
|