zf =: ({.!.'0'~ -)~ ":
   5 zf 123
00123 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of June Kim
> Sent: Monday, March 03, 2008 11:50 AM
> To: Programming forum
> Subject: [Jprogramming] zero-fill
> 
> I sometimes have to zero-fill.
> 
>    zf=:'0' ([: I. ' ' = ])} ":
>    5 zf 123
> 00123
>    5 zf 13
> 00013
> 
> I have a feeling that I might be missing a more obvious and 
> simpler solution.
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to