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

Home » Public Forums » archive » Re: Formatting output
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: Formatting output [message #23435 is a reply to message #23434] Fri, 26 January 2001 16:10 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Guillaume Dargaud (dargaud@sung3.ifsi.rm.cnr.it) writes:

> I want to format a string output but can't get it straight. Basically I want
> floats to converts to a string with no space, no decimals and no dots.
> I've tried many ways, here's the latest:
>
> FOR i = 0, OrbNum-1 DO xtn[i]=STRING( $
> fix(OrbArray[i,0]),fix(OrbArray[i,5]),$
> fix(OrbArray[i,6]), FORMAT='(I," ",I,"h",I)')
>
> But it comes out with spaces...

I'm not sure exactly what you are trying to do
here, because you a putting at least one space
in with your format statement. But you could
probably eliminate most of the others by
using I0 as the integer format specifier.
The zero indicates that IDL should use the
"natural" width of the number.

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
Read Message
Read Message
Read Message
Previous Topic: Reading GrADS data file in IDL
Next Topic: Re: Creating a sphere (Object Graphics)

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

Current Time: Wed Oct 08 20:14:53 PDT 2025

Total time taken to generate the page: 0.02449 seconds