Hi Denver
>> What about this one?: >> $TR($J(x,4)," ",0) > That's fine if x is a positive integer. > > What if it is "A" or "-.1"? That returns "000A" and "0-.1".
I know. It was a rhetorical question to Timur.
What did you have in mind?
The question is: What do you have in mind? If your domain is strictly positive integers, what Timur gave is fine.
$E("-",x<0)_$TR($J($ABS(x\1),4)," ",0) ;not tested
OK. I thought perhaps you had revealed a trap or something else in Timur's suggestion which your obtuse comment left for "self study" or the like ... I couldn't see anything.
I've never seen anything else than unsigned digitals applied leading zeroes and the question - with 5 as the example - didn't indicate a uncommon situation.
/gustav
