Errmm... I'm not so sure it's a bug!
[EMAIL PROTECTED] wrote:
>
> eventi wrote:
> > And I havn't seen an elegant way to concatenate binary! type data.
> > Join would be nice.
> >
> > >> probe join #{012345} [ #{0123} ]
> > #{012345237B303132337D}
>
> Have you tried 'join? Like this:
>
> >> join #{012345} #{0123}
> == #{0123450123}
>
> It seems simpler to me. BUT! It also looks to me that you've found
> a bug in rebol, that seems odd.
>
>> foo: probe join #{012345} [ #{0123} ]
#{012345237B303132337D}
== #{012345237B303132337D}
OK, that's the odd-looking thingie. What does it actually contain?
>> foreach c foo [
[ use [cc] [
[ cc: to-char c
[ print [c "^-" enbase/base to-string cc 16 "^-" cc]
[ ]
[ ]
1 01
35 23 #
69 45 E
35 23 #
123 7B {
48 30 0
49 31 1
50 32 2
51 33 3
125 7D }
So, it appears that join took the content of the block, converted it
to a string, and concatenated the bytes of the string onto the binary
value that was its first argument, and gave back that result.
Compare and contrast with
>> join #{32} [1234]
== #{3231323334}
and
>> foo: probe join #{012345} #{0123}
#{0123450123}
== #{0123450123}
-jn-
- [REBOL] Problem with try [ open/direct/binary tcp://... ] eventi
- [REBOL] Problem with try [ open/direct/binary tcp://... petr . krenzelok
- [REBOL] Problem with try [ open/direct/binary tc... eventi
- [REBOL] Problem with try [ open/direct/binar... Al . Bri
- [REBOL] Problem with try [ open/direct/b... eventi
- [REBOL] Problem with try [ open/dir... Al . Bri
- [REBOL] Re: Problem with try [ open... rebol
- [REBOL] Problem with try [ open... eventi
- [REBOL] Problem with try [ ... Al . Bri
- [REBOL] Problem with try [ ... joel . neely
- [REBOL] Problem with try [ ... larry
- [REBOL] Binary weirdness (w... eventi
- [REBOL] Problem with try [ ... g . santilli
- [REBOL] Problem with try [ ... joel . neely
- [REBOL] Problem with try [ ... brett
- [REBOL] Problem with try [ ... joel . neely
- [REBOL] Problem with try [ ... g . santilli
- [REBOL] Problem with try [ ... joel . neely
- [REBOL] Re: Problem with tr... rebol
- [REBOL] Problem with try [ ... carl
