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

Home » Public Forums » archive » Simple number formatting problem
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: Simple number formatting problem [message #21048 is a reply to message #21023] Fri, 04 August 2000 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Mark Hadfield" <m.hadfield@niwa.cri.nz> writes:

> "Luis Alonso" <luis.alonso@uv.es> wrote in message
> news:8mbrv6$ra0$1@peque.uv.es...
>>> 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!

Craig

Example:
IDL> print, 1, format='("<",I0,">")'
<1>
IDL> print, 10, format='("<",I0,">")'
<10>


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ascii_template
Next Topic: Re: I $400 TODAY AND IT IS ONLY 3PM

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

Current Time: Sat Oct 11 07:12:23 PDT 2025

Total time taken to generate the page: 1.04319 seconds