Write on same line of display problem

Write on same line of display problem

I want to write program progress on the same line of the display (no scrolling). I have a method that works with GNU Fortran and PGI Fortran, but not with Intel Fortran. The example below displays 1, 2, 3...10 on the same line seperated by 1 second delay. With Intel Fortran there is a 10 second delay with nothing on the display and then a 10 at the end.

It seems that the FLUSH statement isn't working. I also tried the CALL FLUSH(6) intrinsic without any improvement.

do i=1,10 write (*,"(A1,I2)",advance="no") char(13), i flush(6) call sleep(1) enddo write (*,*) 

Can you help me get thisfeature working with Intel Fortran? I am using version12.0.0 build 107.
Thanks.

5 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

There is no standard-conforming way to do this. I have a feature request in to allow FLUSH to do what you want. There is a way to do it with non-standard edit descriptors and Fortran carriage control.

Steve

Is there an estimated date to have the feature added to FLUSH?

No commitment has been made. I will add your interest to the request.

Steve

This was implemented in a 13.0 update. Sorry for not updating the thread earlier.

Steve

Melden Sie sich an, um einen Kommentar zu hinterlassen.