Read ASCII File with QuickWIN (CVF) and write it

anthonyrichards
Total Points:
4,302
Status Points:
3,802
Brown Belt
June 27, 2009 3:50 PM PDT
Rate
 
#1
Quoting - kaffee46
Hi to everybody,

i am building a QuickWIN Application and at the moment i am trying to read in a ASCII-File (*.txt).
The file looks like this:

Tiefe   cC      Härte     RA
0.000  0.706  63.445  5.125
0.016  0.707  63.417  5.189
0.032  0.709  63.388  5.254
0.048  0.711  63.360  5.319
0.064  0.713  63.331  5.385
0.080  0.714  63.302  5.450
0.096  0.716  63.274  5.516
0.112  0.717  63.245  5.582
0.128  0.719  63.216  5.648
0.144  0.721  63.187  5.713
0.160  0.722  63.159  5.779

For me interesting is only column one and two (Tiefe and Cc).

I tried to use an existing code of an example application, but unfortunately it does not work.
There is no error when building the program, but the screen is empty...

Find below my code for "reading the file" and the subroutine to write the ASCII-File to the screen.

SUBROUTINE ImportAscii( checked )
USE ImportAsciiGeneral
USE COMDLG32
IMPLICIT NONE

LOGICAL checked
INTEGER ind

CALL ImportAsciiOpenFileNameStruktur('Wähle zu ladende Ergebnisdatei'C )
IF ( GetOpenFileName( OF ) ) THEN ! OK , Cancel?
! Read Data
OPEN (FUNIT, FILE=TxtFile)
DO ind = 1, dimV
READ (FUNIT,*)          ! xV(ind), yV(ind)
END DO
CLOSE (FUNIT)
! Show Data
CALL ZeigeErgebnisse
END IF

RETURN
END

FIND HERE THE SUBROUTINE "ZeigeErgebnisse"

SUBROUTINE ZeigeErgebnisse
USE ImportAsciiGeneral
IMPLICIT NONE
INTEGER ind

6000 FORMAT(F20.3,3X,F20.3)

DO ind = 1, dimV
WRITE(qwUErg, 6000) xV(ind), yV(ind)
END DO

RETURN
END

I hope somebody is able give me an advice or correct my code...

Thanks
Marco

Remove the ! from READ(FUNIT,*)    !XV(IND), YV(Ind)
as you have made your variables into a comment!

Intel Software Network Forums Statistics

8470 users have contributed to 31601 threads and 100640 posts to date.
In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 153 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus