[erlang-questions] {1} > 100 returns true ?!

Michael McDaniel <>
Fri May 15 23:51:11 CEST 2009


 Per documentation in the reference manual section 6.11 Term Comparison,
 numbers compare less than tuples ...

"The arguments may be of different data types. 
 The following order is defined:
number < atom < reference < fun < port < pid < tuple < list < bit string"


 If you are asking *why* that design decision was made, I do not know.


~Michael




On Fri, May 15, 2009 at 02:29:01PM -0700, Steve Kirsch wrote:
> i must admit I am a bit baffled by why this isn't an error:
> 
> 4> {1,3} > 100.
> true
> 5> {1} >100.
> true
> 6>
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list