Say I want class A to be a "friend" of B. I put A and B in the same module.
OK.
Now say I want class C to be a friend of A, but not of B. So if I put C in
the same module as A and B, C will be a friend of both? But what if I wanted
C to only be a friend of A? Can I put A and C in one module, and then put A
and B in another module, thus declaring A twice?
Perhaps I misunderstand, but it seems that we still have the problem that
these relationships are purely hierarchical, when they should be relational
and accept hierarchical as a special case. But I will readily concede my
ignorance in this - maybe there is no other way.
Alvaro Fernandez
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]] On Behalf Of
[log in to unmask]
Sent: Thursday, March 04, 2004 1:47 AM
To: [log in to unmask]
Subject: Re: Symbols
> That's what I recalled. How does it work with private/public, though? Is
> there a "friend" classification, or varying degrees of protection?
>
> Alvaro
There's no need for anything like a "friend" classification. If two
"classes" are "friends," just put them in the same module. The module
is a concept entirely lacking in C++.
--
Van Snyder | What fraction of Americans believe
[log in to unmask] | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.
|