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: [mg19109] Re: [mg19036] equaltity of lists
  • From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
  • Date: Thu, 5 Aug 1999 01:35:24 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

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

In[1]:=
?==
lhs == rhs returns True if lhs and rhs are identical.

In[2]:=
?===
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
latter.
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp



>
> Von: Drago Ganic <drago.ganic at in2.hr>
> An: mathgroup at smc.vnet.net <mathgroup at smc.vnet.net>
> 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