Skip to content
Prev 42709 / 63421 Next

Calling FORTRAN function from R issue?

G'day Berend,

On Tue, 6 Mar 2012 11:19:07 +0100
Berend Hasselman <bhh at xs4all.nl> wrote:

            
[...]
Just noticing that it is always zx[0].i, same with the imaginary part
of zy.  But this is probably not of importance. :)
[...]
[...]
Same here.

Once I change the line

	external double complex zdotc

in your fortran subroutine to

	double complex zdotc

everything works fine and I get as result 14.0, 0.0.

It is long time ago that I was taught (and studied) the FORTRAN 77
standard.  But flipping through some books from that time I thing I
have some inkling on what is going on.  The "external" statement is not
needed here (seems to be used in the sense that C is using the
"external" statement).

Cheers,

	Berwin