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

Home » Public Forums » archive » Re: Digits in IDL
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: Digits in IDL [message #67853 is a reply to message #67845] Tue, 25 August 2009 09:58 Go to previous messageGo to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Aug 25, 5:48 pm, pp <pp.pente...@gmail.com> wrote:
> On Aug 25, 1:37 pm, Spon II <christoph.b...@gmail.com> wrote:
>
>> you can do this using format codes, either with PRINT or STRING.
>
>> e.g.
>> print, indgen(12)+1, format='(I2)'
>
> If you want to force the number to always use two digits (with the
> leading 0), you need to use I02 or I2.2, instead of I2. If you want
> the 1 digit numbers to occupy only one character (with no leading 0),
> you can use I0 instead.

Oops, good catch. That should be '(I02)'.
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Speed-up of code
Next Topic: Re: data criteria

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

Current Time: Sat Nov 29 15:08:06 PST 2025

Total time taken to generate the page: 0.24363 seconds