Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Important Update: Community Platform Migration​. Learn more​>

no advance

wen
Beginner
1,814 Views

When a multi-loop process takes long time, I would like to have the loop number shown on the monitor. And I prefer having the loop number appear at the same spot so that other information is not rolled up.

I wrote a test program as follows:

program noAdvanc

use IFPort

integer loop

do loop = 1, 5

write(6,11) char(13), loop

11 format($,a,i5)

call sleep(1)

end do

end program noAdvanc

This program does what I wold like to see. But F95 does not allow the edit descriptor ($,a,i5).

If I have two of those statements replaced by

write(6,11,advanmce=no) char(13), loop

11 format(a,i5)

The monitor does not show 1, 2, 3, and 4 before showing the last number 5.

What is the way, which meets the F95 standard, to do it?

Wen

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,814 Views
There is no standard way in F95 to do this. The ADVANCE feature in Fortran allows you to build a record over several WRITE statements, but there's nothing in the standard saying when or whether the partial record should be displayed.
0 Kudos
wen
Beginner
1,814 Views
Steve,
Thank you.
Wen

By the way, I just clicked on "Quick Reply" and there was no responce.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,814 Views

Try reworking the routine using PUTC.

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
1,814 Views
If you're willing to use PUTC, then use of the $ format would probably be easier.

QuickReply opens a popup window - if your browser blocks those, you wouldn't see it.
0 Kudos
Reply