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

Home » Public Forums » archive » Padding numbers
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Padding numbers [message #42310] Thu, 03 February 2005 00:01
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
I've got a program which prints out the current time, but when it prints
out the minutes or seconds, there's no 0 padding if the number is in the
range 0 - 9.

print, systime(/JULIAN), $
FORMAT = '(C(CDI, X, CMoA, X, CYI, X, CHI, ":", CMI, ":", CSI))'
3 Feb 2005 1:53:47

This looks good, but just wait until those seconds roll over.


print, systime(/JULIAN), $
FORMAT = '(C(CDI, X, CMoA, X, CYI, X, CHI, ":", CMI, ":", CSI))'
3 Feb 2005 1:54: 2

Not so good. How do I change the format to fill that empty space with a
zero? Same goes for minutes when they roll over. Thanks.


-Mike
[Message index]
 
Read Message
Previous Topic: Tetris Game
Next Topic: How do I force standard output?

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

Current Time: Sat Oct 11 10:39:58 PDT 2025

Total time taken to generate the page: 0.78061 seconds