Fortran Variables 77

3

I took a code in fortran 77 where it has a line like this:

DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/

I'm transponder it to PHP. I would like to know what D0 are after assigning the values?

Here - > ZERO / 0 D0 /

    
asked by anonymous 26.10.2018 / 21:12

1 answer

2
DATA ZERO/0D0/,HALF/0.5D0/,ONE/1D0/,TWO/2D0/,THREE/3D0/,FOUR/4D0/

1) It is a concatenated statement in a line, that is, it is the same thing as declaring one by one at a time:

ZERO  = 0D0
HALF  = 0.5D0
ONE   = 1D0
TWO   = 2D0
THREE = 3D0
FOUR  = 4D0

2) For double precision variables:

See more at: Double Precision in Real Numbers  A good example: Double Precision Real (floating point numbers) in Fortran are written in different variations as follows:

    
19.11.2018 / 13:05