Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a problem with a fortran code. The problem is that I have a file with 14 columns and 644 lines. I use these commands but my .exe file does not showing what I would like and finally crashed.

could you please help me?

What I have tried:

parameter (len=644) ! lines
dimension A(len,14) !rows

character header*110,Var1(len)*4,Var2(len)*8,Var3(len)*8
+ ,Var4(len)*8,Var5(len)*8,Var6(len)*8,Var7(len)*8,Var8(len)*8,Var9(len)*8,
+ ,Var10(len)*8, Var11(len)*8,Var12(len)*8,Var13(len)*8,Var14(len)*8,header_append*97
open(7,file='testdata.txt',status='old')
open(8,file='EX-1.out',status='unknown')

do i=1,len
write(*,5) A(i,1)
end do


5 format(2x,f3.1)

do i=1,ip
write(*,5) A(i,1)
end do

stop
end
Posted
Updated 4-Jan-22 2:50am
v2

1 solution

Please stop reposting the same question over again. We have already given you some suggestions in the original, and the first repost.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900