Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make the computer thinking ... seems to be 1

Status
Not open for further replies.

flav256

Programmer
May 28, 2003
21
0
0
FR
I d like to make a fortran 90 code that print on the screen something like a star turning on itself...
with these characters :
- / | \ - / |
on the same place, each characters should appear one after one...

I though :
--------------------------
do i=1,8000
write(*,'(a1)',advance='NO') '\'
write(*,'(a1)',advance='NO') '-'
write(*,'(a1)',advance='NO') '/'
write(*,'(a1)',advance='NO') '|'
write(*,'(a1)',advance='NO') '\'
write(*,'(a1)',advance='NO') '-'
write(*,'(a1)',advance='NO') '/'
write(*,'(a1)',advance='NO') '|'
end do
--------------------------

but it doesn't work... In fact, the parameter advance allows to write on the same line... but not on the same place as the previous writing...

So Is anybody can help me ?

Is there a command to rewind the writing buffer?

Thanks

Take care

flav
 
I ve tried the command

backspace(*)

between each write statement....

but it doesn t work
 
I'm not sure if this will work, but try writing the backspace character using the CHAR function, like

write(*,'(a1,a)',advance='NO') '\',CHAR(8)

(I think 8 is the correct value for backspace, but you may want to double check).
 
IT WORKS!!!!!

THANK YOU

(don t need too much to make me happy)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top