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

Home » Public Forums » archive » Re: anything like sprintf?
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: anything like sprintf? [message #58819 is a reply to message #58818] Mon, 18 February 2008 03:43 Go to previous messageGo to previous message
david[4] is currently offline  david[4]
Messages: 5
Registered: January 2008
Junior Member
In this cases i use the following instruction:

IF (strlen(svalue) eq 1) THEN svalue='0'+svalue

Where value must be the string representing your value without SPACES.
svalue=STRTRIM(value,2)

But is not very good looking i think..

Yann Zoll wrote:
> Hi newsgroup.
>
> I just wonder if there is any good looking way to do apply a preceding
> zero to a string if value is less than 10.
> To build a time string from integer values of hour, minute, second.
> In perl there is the sprintf command to do this. Is there anything like
> this in IDL?
>
> Thx, Yann
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: anything like sprintf?
Next Topic: yaxisformat='exponent' in IDLgrGraphics

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

Current Time: Sat Oct 11 08:54:17 PDT 2025

Total time taken to generate the page: 1.28131 seconds