MathGroup Archive 2006

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

Search the Archive

Re: MemberQ

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68661] Re: MemberQ
  • From: dimmechan at yahoo.com
  • Date: Mon, 14 Aug 2006 06:44:46 -0400 (EDT)
  • References: <0533005404FE2E45B90AF737DE5A991A015312F3@de01exm67.ds.mot.com> <ebmt7i$6cj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi leigh,

I am not a specialist, but everything seems ok to me

In[1]:=
$Version

Out[1]=
"4.0 for Microsoft Windows (April 21, 1999)"

In[2]:=
InputForm[lst=Range[0,1,1/10]]

Out[2]//InputForm=
{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10, 1}

In[3]:=
MemberQ[lst,2/10]//Trace//InputForm

Out[3]//InputForm=
{{HoldForm[lst], HoldForm[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10,
4/5, 9/10, 1}]},
 {{HoldForm[10^(-1)], HoldForm[1/10]}, HoldForm[2/10], HoldForm[1/5]},
 HoldForm[MemberQ[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10,
1}, 1/5]], HoldForm[True]}

In[4]:=
MemberQ[lst,HoldForm[2/10]]//Trace//InputForm

Out[4]//InputForm=
{{HoldForm[lst], HoldForm[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10,
4/5, 9/10, 1}]},
 HoldForm[MemberQ[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10,
1}, HoldForm[2/10]]], HoldForm[False]}

Cheers

Jim


  • Prev by Date: Re: Question about DiracDelta
  • Next by Date: Re: using answer form reduce
  • Previous by thread: Re: Re: MemberQ
  • Next by thread: Re: MemberQ