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

Home » Public Forums » archive » Re: xyouts: define decimal places of variable
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: xyouts: define decimal places of variable [message #65234] Thu, 19 February 2009 19:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark writes:

> On Feb 19, 12:35=A0am, Carsten Lechte <c...@toppoint.de> wrote:
>> Use the STRING function, which does accept format statements:
>>
>> XYOUTS, 0.5, 0.5, STRING( 0.3453534534, FORMAT=3D'(F6.2)')
>
> A minor addition: you can omit the leading spaces with FORMAT=3D'(F0.2)'

While I am thinking about it, I always use NUMBER_FORMATTER
to format numbers into strings so I can display them in
text widgets. You can specify how many decimal places
you want in the number with a keyword.

http://www.dfanning.com/programs/number_formatter.pro

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interpolating/gridding field reflectance spectra
Next Topic: Re: Interpolating/gridding field reflectance spectra

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

Current Time: Wed Oct 08 19:10:58 PDT 2025

Total time taken to generate the page: 0.00421 seconds