I have 2 format commands, depending upon a given variable value.
The format commands are as follows:
201 format(' HYDRO OUTPUT: ', 1i5, 1p, 7d15.5, 0p, 1f12.7) 202 format(' HYDRO OUTPUT: ', 1i5, 1p, 4d15.5, 0p, 1f12.7)
Whilst the calling routines are within this selection piece…
if (massonly .EQ. 0) then accL = 0.75 * GRAV * CorM * fluxM / CorR totL = accL + CorL write(6,201) i, TIME, DTIME, CorM, CorR, CorL, & & totL, fluxM, smass else write(6,202) i, TIME, DTIME, CorM, fluxM, smass endif
The thing is that I believe this runs the first, then progresses onto the second command (the second is followed by an END command, which I assume returns the code back to where it came from?
Am I wrong and, if so, where might I be going wrong?
For clarity, if I have massonly set to 0 or 1, I get the same output results.