Jean-Yves Tillier writes:
> Apparently and unfortunately, it is not allowed to declared the foramts in
> modules. Is there another way to declare formats common to several programs?
Use a character variable or parameter, which you can declare in a
module.
> integer, parameter :: k2 = select_int_kind(2)
>
> the compiler gives me:
>
> f90: Error: imaging_module.f90, line 12: This name does not have a type, and
> must have an explicit type. [SELECT_INT_KIND]
Probably because you used "implicit none" (good) and then mispelled the name
of selected_int_kind. Things like mispellings are among the stuff
that "implicit none" helps to catch. I could be wrong here, but that
would be my guess.
> f90: Severe: imaging_module.f90, line 12: Please report this error along with
> the circumstances in which it occurred in a Software Problem Report
...
> is it normal?
I'm always amazed at the regularity with which people see messages
like this and wonder whether it is a problem wth their code. The
message says to submit a "Software Problem Report" (presumably
the terminology used by that vendor for bug reports). It is
*ALWAYS* a compiler bug when you get a message like that. There
may or may not also be a bug in your code (in this case, it looks
like there is - your mispelling of selected_int_kind). But if
the compiler says it has a bug, then it is *ALWAYS* right
(if it has no other problem, then the bug is that it put out
an inappropriate message)
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|