Re: [Q] Reading from ASCII file? [message #12253] |
Fri, 24 July 1998 00:00  |
mgs
Messages: 144 Registered: March 1995
|
Senior Member |
|
|
In article <35B6E8E9.75FCB5A3@ramses.tss.no>, gunnarlr@phys.uit.no wrote:
> Hi!
>
> I'm reading UTM map coordinates from an ASCII file, which has lines
> like:
> 681765.37 7450650.54 334 1
>
> I read this with code on the form:
> while (NOT EOF(unit)) do begin
> format='(2D,2I)'
> readf,unit,temp1,temp2
> UTMcoords(*,i)=temp1
> pixelcoords(*,i)=temp2
> i=i+1
> endwhile
> (all relevant variables in double format)
>
> Everything works out fine, exept that the second column is rounded off:
> 7450650.54 ---> 7450650.5
> that is: 8 numbers in any case (before or after the decimal-point). "So
> what?" you're saying? The problem is that I really need all my 9
> numbers. Anyone got an idea??
>
> Regards,
> Gunnar L. Rasmussen, Applied Physics, Univ. of Tromsoe, Norway
I suspect your data is read and stored intact, but printed in a rounded
format. Look at the Print, Format=() commands to see what's actually in
the variables.
--
Mike Schienle Interactive Visuals
mgs@la.znet.com http://la.znet.com/~mgs/
|
|
|