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: [mg19058] Re: equaltity of lists
  • From: "P.J. Hinton" <paulh at>
  • Date: Thu, 5 Aug 1999 01:34:49 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <7o5ih1$>
  • Sender: owner-wri-mathgroup at

On 2 Aug 1999, Drago Ganic wrote:

> 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

In order to get False as a result in your first example, you must use a
stronger logical test function than Equal[].  You need to use SameQ[].

In[1]:= {a,b} === {b,a}

Out[1]= False

P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Notebooks as Forms for input
  • Next by Date: Re: Controlling GIF size
  • Previous by thread: Re: equaltity of lists
  • Next by thread: Re: equaltity of lists