Mathematica 9 is now available
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: [mg19071] Re: equaltity of lists
  • From: "David Bailey" <db at salford-software.com>
  • Date: Thu, 5 Aug 1999 01:34:57 -0400
  • Organization: University of Salford, Salford, Manchester, UK
  • References: <7o5ih1$rml@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Drago Ganic <drago.ganic at in2.hr> wrote in message
news:7o5ih1$rml at smc.vnet.net...
> 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
>

x==y only gives a True or False answer if the answer is unequivocally True
or False regardless of any variable assignments you might subsequently make.
Thus in your example setting a and b to 1 would make your two lists equal.
You probably need to use === which tests two expressions for equality as
they are at that instant.

David Bailey
Salford Software




  • Prev by Date: Re: Biased Random[Integer]?
  • Next by Date: Re: equaltity of lists
  • Previous by thread: Re: equaltity of lists
  • Next by thread: Re: equaltity of lists