From bhh at xs4all.nl  Tue Mar  6 16:00:45 2012
From: bhh at xs4all.nl (Berend Hasselman)
Date: Tue, 6 Mar 2012 16:00:45 +0100
Subject: [Rd] Calling FORTRAN function from R issue?
In-Reply-To: <D0D80B8E-E5A8-457E-9399-09EFA3570E79@xs4all.nl>
References: <CADUbQ5ghmCd-3K4hx=FrzhA8YwfohhUp0-g6rJHHU0s-uEfN+A@mail.gmail.com>
	<B1B70BE3-2D8A-495B-8893-CC67026E1E9F@xs4all.nl>
	<20120306195608.7ec858c0@bossiaea>
	<879BAEC9-1963-4574-B962-CA8CC9D4F13B@xs4all.nl>
	<20120306213703.6a5a091f@absentia>
	<4F561C79.2090002@stats.ox.ac.uk>
	<D0D80B8E-E5A8-457E-9399-09EFA3570E79@xs4all.nl>
Message-ID: <5441A736-5C06-43E2-ACA9-7AAE10438257@xs4all.nl>


On 06-03-2012, at 15:46, Berend Hasselman wrote:

> 
>> 
>>> Thus, perhaps strangely, if there is only a
>>> 	external double complex zdotc
>>> declaration in your subroutine, the compiler doesn't know that a call
>> 
>> The only 'strangely' thing is that is accepted: AFAICS is it not valid according to the link above.
>> 
> 
> Agree. The fortran 77 standard doesn't allow that syntax and I'm really surprised that no error is flagged.
> 

Got it.
See http://www.fortran.com/F77_std/rjcnf0001-sh-3.html#sh-3.1.6

Compiler ignores the blanks and

	external double complex zdotc

becomes

	external doublecomplexzdotc	

And that is legal.

And how long have I been using Fortran? I won't tell.

Berend



[Rd] Calling FORTRAN function from R issue?
Berend Hasselman