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.

publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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 - Intel Developer Support

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 - Intel Developer Support

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

Steve - Intel Developer Support

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya