I have written this very simple code in Fortran:
program su implicit none real ran3 write(*,*) ran3(0) end program su real*8 function ran3(iseed) im
First you have to define idum as an integer.
idum
program su implicit none integer idum real ran3 idum = 334 write(*,*) ran3(idum) end program su
then your code will work