K Kenji4861 Banned Jan 28, 2001 2,821 0 0 Apr 4, 2002 #1 I just want to know how to output everything onto one line. do 100 i=1, 10 write (*,*) i 100 continue If I do this, it outputs as 1 2 3 4 5 6 7 8 9 10 How can I make it so, it'll go 1 2 3 4 5 6 7 8 9 10
I just want to know how to output everything onto one line. do 100 i=1, 10 write (*,*) i 100 continue If I do this, it outputs as 1 2 3 4 5 6 7 8 9 10 How can I make it so, it'll go 1 2 3 4 5 6 7 8 9 10
A Abzstrak Platinum Member Mar 11, 2000 2,450 0 0 Apr 5, 2002 #2 Its been a REALLY long time, so I may be wrong, but it was either fortran or basic where if U put a ; at the end of the line it'll skip the CR. if it doesn't work lemme know, I think I still have a fortran book somewhere.
Its been a REALLY long time, so I may be wrong, but it was either fortran or basic where if U put a ; at the end of the line it'll skip the CR. if it doesn't work lemme know, I think I still have a fortran book somewhere.
R rgwalt Diamond Member Apr 22, 2000 7,393 0 0 Apr 5, 2002 #3 Use an implied do loop Write(*,*) (i, i=1,10) And you'll probably need to use a format specifier, but you can figure that out pretty easily. Ryan
Use an implied do loop Write(*,*) (i, i=1,10) And you'll probably need to use a format specifier, but you can figure that out pretty easily. Ryan
N NucEm Senior member Jun 13, 2001 242 0 76 Apr 7, 2002 #4 One way is: Do 100 i=1,10 Write (6,150) i 150 Format (I3,$) 100 continue Write (6,*) There are other ways too.
One way is: Do 100 i=1,10 Write (6,150) i 150 Format (I3,$) 100 continue Write (6,*) There are other ways too.