Binary guards problem

Bjorn Gustavsson <>
Mon Oct 23 12:20:24 CEST 2000


Luke Gorrie <> writes:

> Sean Hinde <> writes:
> 
> > All,
> > 
> > There seems to be a small problem with binaries in R7B:
> > 
> > test(<<B/binary>>) when size(B) < 4 ->
> > 	small;
> > test(<<1, B/binary>>) ->
> > 	large.
> > 
> > calling test(<<1, 2>>) returns large
> > calling test(<<2, 2>>) returns small
> > 
> > It works fine in the debugger.. 
> 
> I've noticed another quirk, where for some cases "Bin1 = Bin2" fails
> with a badmatch, but "true = Bin1 == Bin2" succeeds. Is this a bug? If
> so I can send some code to reproduce it.

Yes, I would like to see the code that reproduces the error.

/Björn

-- 
Björn Gustavsson            Ericsson Utvecklings AB
      ÄT2/UAB/F/P
			    BOX 1505
+46 8 727 56 87 	    125 25 Älvsjö



More information about the erlang-questions mailing list