Difference between equal to and exactly equal to term comparison operators

前端 未结 1 1196
借酒劲吻你
借酒劲吻你 2021-02-14 08:00

What is the difference between the equal to (==) and exactly equal to (=:=) erlang term comparison operators?

1条回答
  •  不知归路
    2021-02-14 08:49

    The former (==) compares values; the latter (=:=) compares values and types.

    1> 1 =:= 1.0.
    false
    2> 1 == 1.0.
    true
    

    0 讨论(0)
提交回复
热议问题