Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: equaltity of lists

  • To: mathgroup at
  • Subject: [mg19109] Re: [mg19036] equaltity of lists
  • From: "Andrzej Kozlowski" <andrzej at>
  • Date: Thu, 5 Aug 1999 01:35:24 -0400
  • Sender: owner-wri-mathgroup at

Mathenatica distinguishes between == (Equal) and === (SameQ). You can see
the difference between then from online help:

lhs == rhs returns True if lhs and rhs are identical.

lhs === rhs yields True if the expression lhs is identical\

to rhs, and yields False otherwise.

In the case {a,b}=={b,a} Mathematica does not know if the expressions are
indenitical or not becaue it does not know the values of a and b. So it
retuns the input uneveluated. In th esecond case it also does not know the
values of a and b but as it has to return True or False it chooses the
Andrzej Kozlowski
Toyama International University

> Von: Drago Ganic <drago.ganic at>
> An: mathgroup at <mathgroup at>
> Datum: Mittwoch, 4. August 1999 01:06
> Betreff: [mg19036] equaltity of lists
>>Hi !!
>>Why don't I get an answer (False) when I ask Mathematica
>>    {a,b}=={b,a}
>>like the one I get with
>>    {1,2}=={2,1}
>>    False
>>Greetings from Croatia,
>>Drago Ganic

  • Prev by Date: Re: equaltity of lists
  • Next by Date: Re: Conversion of output
  • Previous by thread: Re: equaltity of lists
  • Next by thread: Re: equaltity of lists