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: [mg19111] Re: [mg19036] equaltity of lists
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 5 Aug 1999 01:35:27 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Drago,

Mathematica can't tell if {a,b}=={b,a}. If a==b they would be equal. If a not equal
b, they would be unequal. Therefore it leaves the expression unevaluated. You might
want to use {a,b}==={b,a} which test if the structure of each side is the same. It
gives False. Also notice that if you use the test in an If statement you can give a
third branch to the If which is used if the condition evaluates to neither True or
False. Check out Equal, SameQ and If in Help.

>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: Conversion of output
  • Next by Date: Re: Lists to mask other lists
  • Previous by thread: Re: Re: equaltity of lists
  • Next by thread: Re: equaltity of lists