Another part of my current program requires me to load another list from file (example as follows)
283 5.40319 0 7.19701
284 2.85188 8.13944 6.15848
285 8.875 0.866025 2.85714
286 0.90817 8.72831 3.05784
287 2.25385 9.11571 5.74259
288 7.03606 5.88346 8.3403
289 2.40222 5.42258 4.07663
290 5.46067 4.49936 10
also in fixed format.
I am disregarding the first column of integers with 10X in FMT. But I need to read the following numbers and record them into a list as REAL*8. The problem is self evident, since I have various types of numbers from Integers to reals.
I also have the folowing program to read from the file. However I assume there is some sort of conflict due to the types presented.
run-time error F6206: READ(d:\test\points.txt)
module comm2
INTEGER J
REAL*8 ARR_PTO(646,3)
end module comm2
program see2
use comm2
OPEN(50,FILE='d:\test\points.txt')
J = 0
10 CONTINUE
J = J + 1
IF (J.GT.647) GOTO 20
READ(50,FMT='(10X,I10,5X,I10,5X,I10)',END=20) ARR_PTO(J,1), ARR_PTO(J,2), ARR_PTO(J,3)
GOTO 10
20 CONTINUE
IF (J.GT.647) WRITE(6,*) ' *** OVERFLOW ***'
CLOSE(50)
print*, 'Array'
do i=1, 3
print*, ARR_PTO(1,i)
end do
end program see2
Could I ask for you help again?
Best regards,
Widukin
283 5.40319 0 7.19701
284 2.85188 8.13944 6.15848
285 8.875 0.866025 2.85714
286 0.90817 8.72831 3.05784
287 2.25385 9.11571 5.74259
288 7.03606 5.88346 8.3403
289 2.40222 5.42258 4.07663
290 5.46067 4.49936 10
also in fixed format.
I am disregarding the first column of integers with 10X in FMT. But I need to read the following numbers and record them into a list as REAL*8. The problem is self evident, since I have various types of numbers from Integers to reals.
I also have the folowing program to read from the file. However I assume there is some sort of conflict due to the types presented.
run-time error F6206: READ(d:\test\points.txt)
module comm2
INTEGER J
REAL*8 ARR_PTO(646,3)
end module comm2
program see2
use comm2
OPEN(50,FILE='d:\test\points.txt')
J = 0
10 CONTINUE
J = J + 1
IF (J.GT.647) GOTO 20
READ(50,FMT='(10X,I10,5X,I10,5X,I10)',END=20) ARR_PTO(J,1), ARR_PTO(J,2), ARR_PTO(J,3)
GOTO 10
20 CONTINUE
IF (J.GT.647) WRITE(6,*) ' *** OVERFLOW ***'
CLOSE(50)
print*, 'Array'
do i=1, 3
print*, ARR_PTO(1,i)
end do
end program see2
Could I ask for you help again?
Best regards,
Widukin