Re: how to convert string into bytes?

for an even number of charsq)“x”$16 sv’0N 2#“0123456789abcdef”?“abcd"0xabcdRegards, AttilaOn 13 Aug 2008, at 07:39, Davies Liu wrote:> On Wed, Aug 13, 2008 at 2:35 PM, Attila Vrabecz <attila.vrabecz> > wrote:>> q)“x”$16 sv"I”$'“26”> 0x26>> but what about “abcd” ?>>> I would be curious why you need BCD (http://en.wikipedia.org/wiki/Binary-coded_decimal&gt; )…>> I need to convert a Binary-coded APIKEY into int.>>> Regards,> Attila> On 13 Aug 2008, at 01:58, Davies wrote:>> >> > Hi,> >> > q) string 0x26> > “26”> >> > q) “x”$string 0x26> > 0x3236> >> > how can i got the 0x26 from “26” ?> >> > Thank you.> >> > Davies> > >>>>>>> >–Apple-Mail-1–215324910Content-Type: text/html

for an even number of chars


q)"x"$16 sv'0N 2#"0123456789abcdef"?"abcd"
0xabcd

Regards,
Attila
On 13 Aug 2008, at 07:39, Davies Liu wrote:

On Wed, Aug 13, 2008 at 2:35 PM, Attila Vrabecz <attila.vrabecz@gmail.com> wrote:

q)"x"$16 sv"I"$'"26"
0x26

but what about "abcd" ?

I would be curious why you need BCD (http://en.wikipedia.org/wiki/Binary-coded_decimal
)...

I need to convert a Binary-coded APIKEY into int.

Regards,
Attila
On 13 Aug 2008, at 01:58, Davies wrote:

>
> Hi,
>
> q) string 0x26
> "26"
>
> q) "x"$string 0x26
> 0x3236
>
> how can i got the 0x26 from "26" ?
>
> Thank you.
>
> Davies
> >








--Apple-Mail-1--215324910--