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 #67854 is a reply to message #67853] Tue, 25 August 2009 09:48 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
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.
[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 22:12:01 PST 2025

Total time taken to generate the page: 0.00209 seconds