|
|
| Author |
Message |
|
| Guest |
Posted: Wed Sep 07, 2011 1:42 pm |
|
|
|
Guest
|
I'm using R14B03 and writing a little NIF library. Today I've
encountered a strange behaviour of =:= when it is used against number
that is set in sources and term that was constructed as
enif_make_unit64. Here is an example:
(circa_dev@localhost)1> {ok, T} = ecirca:new(5, last, small).
{ok,{ecirca,#Ref<0.0.0.57>,<<>>,<0.48.0>,small}}
(circa_dev@localhost)2> {ok, A} = ecirca:size(T).
{ok,5}
(circa_dev@localhost)3> B = 5.
5
(circa_dev@localhost)4> A == B.
true
(circa_dev@localhost)5> A =:= B.
false
(circa_dev@localhost)6> A.
5
(circa_dev@localhost)7> B.
5
This behaviour looks quite weird to me. Is it expected?
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Sep 07, 2011 5:49 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Thu Sep 08, 2011 1:58 pm |
|
|
|
Guest
|
I'm more interested in fixing this behaviour in future releases than patching BEAM myself, because I can easily avoid this error. Is there any hope for this?
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Sep 08, 2011 2:18 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Fri Sep 09, 2011 4:43 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Fri Sep 09, 2011 4:48 pm |
|
|
|
Guest
|
yes.
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|