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!