MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: equaltity of lists


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