5
I got a code on Fortran 77 where there’s a line like this:
DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/
I’m transposing it to PHP. I’d like to know what D0 is after the values are assigned?
Here -> ZERO/0D0/
5
I got a code on Fortran 77 where there’s a line like this:
DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/
I’m transposing it to PHP. I’d like to know what D0 is after the values are assigned?
Here -> ZERO/0D0/
7
DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/
1) Is a statement concatenated into a line, is the same thing as declare one by one:
ZERO = 0D0
HALF = 0.5D0
ONE = 1D0
TWO = 2D0
THREE = 3D0
FOUR = 4D0
2) For variables double Precision:
For a concatenated statement of the kind double Precision, use:
DATA NOME_VARIÁVEL /VALOR/,OUTRO_NOME_VARIÁVEL/VALOR/,...
DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/
See more in:
Double Precision in Real Numbers
A good example:
Double Precision Real literals in Fortran are written in different variations:
Browser other questions tagged fortran
You are not signed in. Login or sign up in order to post.
Good luck
– fernandosavio