Re: Strange behavior using a module which uses another module



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
.



Relevant Pages

  • Re: Private instance variables available everywhere within constructed object
    ...   var private; ...   function Constructor() ... instance's private variables, we can ensure that each instance has its ...
    (comp.lang.javascript)
  • Re: Knife Crime
    ...   Do you run ... I went for private treatment. ... I'm by no means sure I put any more trust in private enterprise run on ...
    (rec.sport.rowing)
  • Re: cant load a textbox array at runtime
    ... Private WithEvents mTB As TextBox ... Friend Sub Init(ParentArr As cTBArray, ...   Set mParentArr = ParentArr ... Public Property Get TBAs TextBox ...
    (microsoft.public.vb.general.discussion)
  • Re: The Obama Deception
    ...    Executive Order no. 11110, ...    of abolishing the private Federal Reserve. ... country" He referred to the Federal Reserve Act passed during his ... Reserve Bank of its power to loan money to the United States ...
    (rec.music.classical.guitar)
  • Re: The Obama Deception
    ...    Executive Order no. 11110, ...    of abolishing the private Federal Reserve. ... country" He referred to the Federal Reserve Act passed during his ... Reserve Bank of its power to loan money to the United States ...
    (rec.music.classical.guitar)