comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Number precision using READ_ASCII
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Number precision using READ_ASCII [message #45503] Tue, 13 September 2005 09:23
Julio[1] is currently offline  Julio[1]
Messages: 52
Registered: May 2005
Member
Yes, you're right, David.
The problem was with the print procedure.

Thanks
Julio
Re: Number precision using READ_ASCII [message #45507 is a reply to message #45503] Tue, 13 September 2005 08:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> I'm using READ_ASCII to read a text file, like this:
>
> ; ENVI Point Collection
> ; projection info =3D {Geographic Lat/Lon, WGS-84, units=3DDegrees}
> ; Image X, Image Y, Lat, Lon
> 1997.00 3636.00 -24.572741 -53.650743
> 1923.00 3572.00 -24.555407 -53.672654
>
> I'm reading only the lat/lon values, but it cuts the last to numbers.
> Example:
>
> -53.650743 is being read as -53.6507
>
> How can I avoid it?

I seriously doubt this is what is happening. It is MUCH
more likely that when you print the number to the display
screen you are using a print format that doesn't have
enough decimal places. Try something like this:

Print, lat, Format='(F10.6)'

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: from array to one dimentional array
Next Topic: Re: no drag events in cw_fslider or widget_slider

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:44:55 PDT 2025

Total time taken to generate the page: 0.00417 seconds