[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple number formatting problem
Craig Markwardt wrote:
> "Mark Hadfield" <firstname.lastname@example.org> writes:
> > "Luis Alonso" <email@example.com> wrote in message
> > firstname.lastname@example.org">news:email@example.com...
> > > > p.s. F95 has a new formatting option, i0, which would print out 1 as
> > > > "1", 10 as "10" etc. i.e. the leading blanks removed. Maybe this should
> > > > go on a future IDL feature request list....? :o)
> > >
> > > strtrim do remove leading blanks. and it would not be longer to write than
> > > the Format thing.
> > Yes, but removal of leading blanks via a format code would be handy for use
> > with TICKFORMAT.
> Not sure what you folks are arguing about. IDL has had the I0 format
> code for as long as I've known, and does exactly what you want!
> IDL> print, 1, format='("<",I0,">")'
> IDL> print, 10, format='("<",I0,">")'
Aww, crap. Thanks for pointing this out. RTFM shure helps. <insert
embarrassed grin right here>
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: firstname.lastname@example.org
Camp Springs MD 20746