[Jprogramming] prefix zero

Matthew Baulch baulch.matt at gmail.com
Mon Feb 1 03:53:43 UTC 2016


I imagine you'd need to convert to a character (as opposed to integer)
array to accomplish this. An integer's representation doesn't record any
leading zeroes.

Perhaps if you could describe the context, someone could provide a better
answer. Are you generating a report, perhaps?
On 1 Feb 2016 2:45 pm, "Steve Mandula" <smandula at idirect.com> wrote:

> Could some solve this problem?
> prefix a zero to a number.
>
> so that 1 2 3
> becomes 01 02 03
> and that 10 or 11 remain without the
> zero prefix
>
> With Thanks
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


More information about the Programming mailing list