| Thread Tools | Search this thread |
|---|
kaffee46
| June 27, 2009 5:49 AM PDT Read ASCII File with QuickWIN (CVF) and write it | ||||
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 | |||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
| 8285 users have contributed to 31229 threads and 99107 posts to date. |
|---|
| In the past 24 hours, we have 9 new thread(s) 39 new posts(s), and 55 new user(s). In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing... Escalated as Please welcome our newest member tvinni |