MathGroup Archive 1996

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

Search the Archive

Re: How to force an Equal[]

  • Subject: [mg3370] Re: [mg3332] How to force an Equal[]
  • From: 76300.3545 at (Dave Snead)
  • Date: 2 Mar 1996 10:10:46 -0600
  • Approved:
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at

"Gerd Lanfermann" <s997826 at> writes

>.Hi there,

>this should be a nice relaxing one. How can I force Mma to evaluate 
>the equal expression, regardless of what values Word or Number 
>stand for. I just want a false in the second case (y1==y2).

>x1={car, nose, 2334.34};
>x2={dummy, 3.1415, 8}; 

>y1=Map[Head,x1]//.{Symbol->Word,Integer->Number, Real->Number}
>y2=Map[Head,x2]//.{Symbol->Word,Integer->Number, Real->Number}
>y3=Map[Head,x3]//.{Symbol->Word,Integer->Number, Real->Number}

>{Word, Word, Number}
>{Word, Number, Number}
>{Word, Number, Number}

>Here we go:


>gives me as desired

>But this guy just returns the expressions:

>{Word, Word, Number} == {Word, Number, Number}

>I would like to see a False here.It works when I do 
>{Symbol->"Word", ...}, converting it to Strings. But I wouldn't
>call that a nice style of writing inMma.


Try using === (SameQ) instead of == (Equal)

Dave Snead
76300.3545 at

  • Prev by Date: Re: How to force an Equal[]
  • Next by Date: Re: quartile
  • Previous by thread: Re: How to force an Equal[]
  • Next by thread: Re: quartile