I attached a fortran code with R but i dont get the expected output. My Fortran code is very simple:
subroutine getintparms(sml,eps,big,mnlam,rsqmax,pmin,exmx)
data sml0,eps0,big0,mnlam0,rsqmax0,pmin0,exmx0 /1.0e-5,1.0e-6,9.9&
&e35,5,0.999,1.0e-9,250.0/
sml=sml0
eps=eps0
big=big0
mnlam=mnlam0
rsqmax=rsqmax0
pmin=pmin0
exmx=exmx0
return
end
I call the Fortran code with the following R-code:
dyn.load("C:\\Users\\Fabian\\Documents\\FortranRoutine.dll")
value=.Fortran("getintparms",fdev=double(1), eps=double(1),
big=double(1),mnlam=integer(1),devmax=double(1),
pmin=double(1),exmx=double(1))
,but i get
$fdev
[1] 4.571853e-315 ->instead of 1.0e-5
$eps
[1] 4.436653e-315 ->instead of 1.0e-6
...
$mnlam
[1] 5 ->this is correct
...
I have no idea why I get this numbers and I have no idea what i did wrong.
...alright I declared my variables now as...
double precision::sml,eps,big,mnlam,rsqmax,pmin,exmx
Now I have some calls which are calling my getintparms subroutine and i always get the error:
Warning 189 - In a previous call to getintparm, the fifth Argument was of type Real(KIND=2), it is now REAL(KIND=1)
how can I avoid this warning message?