[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Formatting output
- Subject: Re: Formatting output
- From: davidf(at)dfanning.com (David Fanning)
- Date: Fri, 26 Jan 2001 17:10:57 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <3a72052b@news.ColoState.EDU>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23249
Guillaume Dargaud (firstname.lastname@example.org) 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,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.
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: email@example.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155