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 #36405 is a reply to message #36404] Thu, 11 September 2003 06:12 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Reimar Bauer <R.Bauer@fz-juelich.de> writes:
>
> Where are the digits ????
>
> Or does it mean I have first to determine the Format of the number and I
> have to use this information to get the right number.
>
> IDL> s = string(d,format='(F12.3)')
> IDL> PRINT,s
> 98046763.617
>
> This goes right. But my feeling is this is terrible. Because I bet noone
> takes care on this. What's your feeling?

No you don't need to figure out the number of significant digits,
since you can use the format code 'D0'. Formatting output properly is
ultimately the programmer's job. As you did, one rapidly discovers
when they get the formatting wrong.

By the way, why use the 'F' format code, when you know that you have
more than 7 significant digits? Aside question to the group: are the
'F' or 'D' format codes any different?

Good luck,
Craig
[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 10:02:53 PDT 2025

Total time taken to generate the page: 0.64133 seconds