Alvaro Fernandez wrote:
> I suspect this has been covered before, but I am not sure.
>
> What I would like to do is to write an integer counter to the same spot on
> the screen repeatedly without moving the cursor:
>
> Processing time step => X
>
> Not
>
> Processing time step => 3
> Processing time step => 4
> Processing time step => 5
>
> and not
>
> Processing time step => 3 Processing time step => 4 Processing time step =>
> 5
>
> Using ADVANCE="NO" in the write statement merely makes the cursor go to the
> left, as in my second example - no carriage return, but I do get cursor
> motion. Is there a way to just print in the same spot?
This was (my interpretation) of the conspiracy of ADVANCE="NO" with a
vertical format character of "+". Vertical format control was removed
from Fortran 2003 because the standard specified no way to detect or
control it, and there was no consensus on the committee how to do so.
The "+" vertical format control character couldn't possibly have worked
anyway, given the description of how records end -- although some vendors
made it work by *not* ending a "record" on the terminal until the next
write occurred.
The Fortran 2003 draft describes a new_line intrinsic function, and the
effect its result value has on stream output. Another intrinsic function
and a description of the effect its result value has on stream output could
achieve the effect Fernandez wants.
--
Van Snyder | What fraction of Americans believe
[log in to unmask] | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.
|