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

Home » Public Forums » archive » Re: problem string from double missing digits
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: problem string from double missing digits [message #36403 is a reply to message #36402] Thu, 11 September 2003 06:24 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <bjpqp2$fhrl$1@zam602.zam.kfa-juelich.de>,
Reimar Bauer <R.Bauer@fz-juelich.de> wrote:

> Hi all,
>
> did someone know what here is going on.
>
> IDL> d = 98046763.617D
> IDL> s = string(d)
> IDL> PRINT,s
> 98046764.
> IDL> HELP,s
> S STRING = ' 98046764.'
>
> Where are the digits ????

The default (free-form) formats are G13.6 for FLOATs and G16.8 for
DOUBLEs. If you need more places to the right of the decimal point, you
have to use an explicit format. (Building IDL Applications, v. 5.6, p.
234)

"G - Use F or E format depending on the magnitude of the value being
processed."


IDL> d = 98046763.617D
IDL> print, d, FORMAT = "(G16.8)"
98046764.
IDL> print, d, FORMAT = "(F20.8)"
98046763.61700000
IDL> print, d, FORMAT = "(E20.10)"
9.8046763617E+07

Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem string from double missing digits
Next Topic: IDL java bridge

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

Current Time: Fri Oct 10 06:32:55 PDT 2025

Total time taken to generate the page: 1.04083 seconds