Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg19058] Re: equaltity of lists
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Thu, 5 Aug 1999 01:34:49 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <7o5ih1$rml@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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.com
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