Re: Fortran 2003 questions
- From: "James Van Buskirk" <not_valid@xxxxxxxxxxx>
- Date: Sun, 25 May 2008 09:51:01 -0600
"Tobias Burnus" <burnus@xxxxxxxx> wrote in message
news:d09eca25-3555-41d9-b2fb-3a25c3527795@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On May 25, 10:49 am, "jaydu...@xxxxxxxxx" <jaydu...@xxxxxxxxxxxxxx>
wrote:
"An interface body in a generic or speci?c interface block speci?es
the EXTERNAL attribute and an explicit speci?c interface for an
external procedure or a dummy procedure."
Regarding EXTERNAL I have an additional question: Is the following
valid or not?
EXTERNAL func
REAL, DIMENSION(2) :: func
I believe it is valid as neither Janus nor I could find a restriction
in the Fortran 95 or 2003 standard, even though all compilers I tried
reject it.
The following related is however definitely invalid
EXTERNAL func
REAL :: func(2)
as F95 and F2003 [5.1 Type declaration statements] contains:
R504 entity-decl is object-name [( array-spec )] [ * char-length ]
[ initialization ]
or function-name [ * char-length ]
Are we reading the standard correctly? Or is there a clause we have
missed?
Section 12.3.1 of N1601.pdf zaps these examples. You can get an
explicit interface if the procedure is an internal procedure, module
procedure, or intrinsic procedure. Procedures which may call
themselves have an explicit interface to themselves. Otherwise you
need an interface body to get an explicit interface. Then section
12.3.1.1 (3)(a) tells us that you need an explicit interface for an
array-valued function.
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
.
- References:
- Fortran 2003 questions
- From: jaydub66@xxxxxxxxx
- Re: Fortran 2003 questions
- From: Tobias Burnus
- Fortran 2003 questions
- Prev by Date: Re: Fortran 90 Chess
- Next by Date: Re: Fortran 2003 questions
- Previous by thread: Re: Fortran 2003 questions
- Next by thread: Re: Fortran 2003 questions
- Index(es):
Relevant Pages
|
|