CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   promote real to double precisio with VISUALfortran (https://www.cfd-online.com/Forums/main/14918-promote-real-double-precisio-visualfortran.html)

Alberto March 11, 2008 11:36

promote real to double precisio with VISUALfortran
 
Hallo I have a code for shallow water equations written in Fortran. there is the option "promote real to double precision" with visual fortran?Because my variables are declared as:

REAL NAME1,NAME2,NAME3

and I want just to compile sometimes in single and simetimes in double precision just changing the option without change the code thanks so much Alberto

bohluly March 12, 2008 02:19

Re: promote real to double precisio with VISUALfor
 
u can use this method !

parameter (n=4)

real(n) name1, .....

if you use modul for data base of variables it will be very easy. it needs to chaing only in main module of your data base

module var_database

parameter (n=4) 'or n=8'

real(n) name1, .....

real(n) name3, .....

end module ... . . .

subroutine sub1

use var_database

end sub1



All times are GMT -4. The time now is 13:47.