- #1
Thibaut
- 1
- 0
Hello,
I'm writing a really simple program in fortran which is a part of a bigger program.
It is not working at the moment, but I really don't know why.
I am calling a function called precision, but the program does not enter it ( I know it since I use write statements inside).
I compared this to other functions on websites, but it really seems to be the same, and so I don't know what to do. ( The 6 spaces are missing in this post, but I put them before the statements)
I need a little help.
Thank you.
My program:
program alpha
real*8 b
b=1.
write(*,*) b
write(*,*) precision(b)
end
c**********
real*8 function precision(a)
real*8 c, a
write(*,*) a
c = 2.E-13
do while (a .LT. 100)
a=a*10.
c= c/10.
write(*,*) a, c
end do
precision = c
RETURN
END
I'm writing a really simple program in fortran which is a part of a bigger program.
It is not working at the moment, but I really don't know why.
I am calling a function called precision, but the program does not enter it ( I know it since I use write statements inside).
I compared this to other functions on websites, but it really seems to be the same, and so I don't know what to do. ( The 6 spaces are missing in this post, but I put them before the statements)
I need a little help.
Thank you.
My program:
program alpha
real*8 b
b=1.
write(*,*) b
write(*,*) precision(b)
end
c**********
real*8 function precision(a)
real*8 c, a
write(*,*) a
c = 2.E-13
do while (a .LT. 100)
a=a*10.
c= c/10.
write(*,*) a, c
end do
precision = c
RETURN
END