> > src/mog.f90(4): error #6401: The attributes of this name conflict with
> > those made accessible by a USE statement. [SYSTEMQQ]
> > character(len=80) :: SYSTEMQQ
> A function should not be declared as a "variable".
> That is where you go wrong.
Well.... no.
First off, he did not declare it as a variable. In fact, there isn't an
explicit way to do any such thing as declare something to be a variable.
This is occasionally a source of confusions. The closest thing to
declaring something as a variable is declaring it to have attributes
that only a variable can have. There are several such attributes, but
this example did *NOT* illustrate any of those.
In particular, the declaration
character(len=80) :: SYSTEMQQ
does not declare systemqq to be a variable. It declares it to have type
character and a length type parameter of 80. That's all. There are
things other than variables that can have those properties. At least 2
off the top of my head, and I suppose I might have forgotten something
else. With no information other than just that line, it could still be a
parameter or a function.
It is possible that you aren't used to pre-f90 style function usage.
Before f90, not only was it allowed to declare the type of your
functions in any scope that used them, it was required unless you relied
on implicit typing. As of f90, some people (myself included) moved more
towards putting procedures in modules in most cases, and using interface
bodies in most of the rest, so I don't much use the pre-f90 style
function declarations any more, but they are still perfectly fine
(except for functions that require explicit interfaces for some reason).
In short, the function declaration that Dieter showed was a perfectly
fine function declaration; that was not where he went wrong. The
above-quoted error message tells a different story. While I haven't used
systemqq myself, I'd lay (very high) odds that it is declared in the
IFPORT module that Dieter used. Trying to redeclare something that is
declared in a module that you use is not legal and is much more the
direction to look for his problem.
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain