I have a a string with value '7.0445'.
It is placed in a real variable (Ci) and appears as
7.044500 in the debugger.
When I try and write it to a string (STR) using F8.3
WRITE(STR,FMT='(F8.3)')Ci
It comes out as 7.044 (NOT 7.045)
However if I make the variable = to 7.044510
Then the value placed in the string is '7.045'
Why could this be?
Why, in the first instance, is the REAL not being rounded?
thanks
It is placed in a real variable (Ci) and appears as
7.044500 in the debugger.
When I try and write it to a string (STR) using F8.3
WRITE(STR,FMT='(F8.3)')Ci
It comes out as 7.044 (NOT 7.045)
However if I make the variable = to 7.044510
Then the value placed in the string is '7.045'
Why could this be?
Why, in the first instance, is the REAL not being rounded?
thanks