Thanks Alan!
hex =: '0123456789abcdef' {~ 16 16 #: ]
dec =: '0123456789' {~ 10 10 #: ]
How would one parse a hex string back to an integer?
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Wed, Nov 2, 2011 at 12:53 AM, Alan Stebbens <[email protected]> wrote:
> On Nov 1, 2011, at 8:33 PM, Andrew Pennebaker wrote:
>
> > All: Even more specifically, I'd like to format n as a two-digit,
> > zero-padded, hexadecimal number.
>
> d2h =: '0123456789abcdef' {~ 16 16 #: ]
>
> d2h
> '0123456789abcdef' {~ 16 16 #: [
>
> ;/d2h i.20
> ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐
> │00│01│02│03│04│05│06│07│08│09│0a│0b│0c│0d│0e│0f│10│11│12│13│
> └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm