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

Home » Public Forums » archive » Re: FROM 5.12345 TO 5.12
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: FROM 5.12345 TO 5.12 [message #24163] Sat, 10 March 2001 23:52
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Mark Chan (chanm@cadvision.com) writes:

> x=[5.12345, 45.378, 1300.3221, ...]
>
> xyouts, 5,7, x[0]
>
> Will give: 5.12345 (in some window)
>
> Want: 5.12
>
> xyouts, 5,7,format='(f4.2)',x[0] ---- not allowed, although the following
> is allowed but not what I need
>
> print,format='(f4.2)',x[0] ---- not what I need
>
>
> Any suggestion?

How about this:

xyouts, 5,7,String(x[0],format='(f4.2)')

:-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: FROM 5.12345 TO 5.12
Next Topic: IDL on Linux Server

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

Current Time: Fri Oct 10 10:29:33 PDT 2025

Total time taken to generate the page: 0.32362 seconds