gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1516 Posts in 502 Topics by 733 Members - Latest Member: tbickel3 October 29, 2020, 01:22:23 AM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  General  |  Rewriting a line in standard out (screen)
gfx
gfxgfx
 

Author Topic: Rewriting a line in standard out (screen)  (Read 1965 times)

lunaai

  • Newbie
  • *
  • Posts: 2
Rewriting a line in standard out (screen)
« on: February 05, 2014, 12:44:48 PM »
I've searched the web and this forum and could not find a solution. I want to update a counter to indicate progress of the code on the screen. I want the previous integer counter to be replaced with the current counter. Does anyone know how to do this in Fortran/Absoft Fortran?

Thanks.

mecej4

  • Jr. Member
  • **
  • Posts: 66
Re: Rewriting a line in standard out (screen)
« Reply #1 on: February 05, 2014, 07:55:04 PM »
Here is an example:
Code: [Select]
[color=black]program counter
do i=1,100000
   j=i*(i+1)/2-3
   if(mod(i,10).eq.0)write(*,'(T1,2i10,A1)',ADVANCE='NO')i,j,achar(13)
end do
end program counter[/color]

« Last Edit: February 05, 2014, 08:07:43 PM by mecej4 »

lunaai

  • Newbie
  • *
  • Posts: 2
Re: Rewriting a line in standard out (screen)
« Reply #2 on: February 05, 2014, 08:09:06 PM »
That doesn't seem to work for me. That just suppresses the "line feed", so everything is on the same line.

Absoft User Forum  |  Support  |  General  |  Rewriting a line in standard out (screen)
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!