in reply to Re: Encode and decode binary-coded decimals
in thread Encode and decode binary-coded decimals
$ perl -le 'print join " ", map {ord pack "H2", $_} shift =~ /../g +' 0396 3 150
I'd expect to get: 0011 1001 011
That is at odds with my expectation.:-) Nevertheless, it isn't too difficult to change these routines to support other ascii, hex or binary representations.
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Encode and decode binary-coded decimals
by jryan (Vicar) on Oct 08, 2002 at 20:23 UTC |