Binary guards problem

Chandrashekhar Mullaparthi Chandrashekhar.Mullaparthi@REDACTED
Mon Oct 23 11:06:39 CEST 2000


It works fine when defined as a fun in the erlang shell.
But when compiled in a module it's the same behavoiur as
Sean has pointed out.

-----Original Message-----
From: Sean Hinde [mailto:Sean.Hinde@REDACTED]
Sent: 23 October 2000 09:52
To: 'Erlang Questions'
Subject: Binary guards problem


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.. 

Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list