Re: equaltity of lists
- To: mathgroup at smc.vnet.net
- Subject: [mg19067] Re: equaltity of lists
- From: adam.smith at hillsdale.edu
- Date: Thu, 5 Aug 1999 01:34:54 -0400
- Organization: Deja.com - Share what you know. Learn what you don't.
- References: <7o5ih1$rml@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Drago
Try using the triple equal === (SameQ). There are subtle differences
between the == (Equal) and the === and I can not explain exactly what
they are. But in this case == fails because it does not "know" what
the values of a and b are. So it just returns the original input which
is Mathematica's way of telling you it can not do this. However ===
seems to do some things with pattern matching and returns the value
False.
Adam Smith
In article <7o5ih1$rml at smc.vnet.net>,
"Drago Ganic" <drago.ganic at in2.hr> 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
>
> Greetings from Croatia,
> Drago Ganic
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.