Print

Print


Sorry all,  I found my mistake.

Regards,
Tuan.

On Tue, Dec 2, 2008 at 9:12 PM, Hoang Trong Minh Tuan <
[log in to unmask]> wrote:

> Can anyone help me with this,  I have a file "data.dat" containing real
> data with high precision like this (2 rows).
>
>   0.596598016919984      -0.382312557470785      -0.528482344762526
>  -8.771967130768960E-002 -0.708964641303998       0.120784051948388
>
>   I want to read it into an array. The variable is declared as follows
>
>   REAL (KIND = SELECTED_REAL_KIND(R=16), DIMENSION(1:2, 1:3) :: INPUTDATA
>
>   fInput = 100
>   open(UNIT = fInput, FILE="initvel.dat", IOSTAT = ios, ACTION='read', FORM
> = 'formatted')
>    i = 0
>   do
>     i = i + 1
>     read(fInput, *, IOSTAT=IOS) INPUTDATA(i)
>     if (i >= 2) then
>       exit
>     endif
>
>    However, it seems that the data is not read correctly. It looks like
> only the first 7 decimal digits are read correctly.
>     0.59659802913666   -0.38231256604195   -0.52848231792450
>    -0.08771967142820   -0.70896464586258    0.12078405171633
>
>   Anyone can show me how to accomplish this operation.
>
> Thanks,
> Tuan
>
>


-- 
Hoang Trong Minh Tuan
PhD Student - Bioinformatics&Computational Biology
George Mason University,Fairfax, VA, US
HP: 703-473-1395