Re: ! operator
- To: mathgroup at smc.vnet.net
- Subject: [mg55934] Re: [mg55927] ! operator
- From: DrBob <drbob at bigfoot.com>
- Date: Sun, 10 Apr 2005 23:07:11 -0400 (EDT)
- References: <200504101055.GAA29078@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
This bug is particularly odd, since Trace gives exactly the same results both ways: !MemberQ[{1,2,3},3]//Trace {{MemberQ[{1,2,3},3],True},!True,False} Not@MemberQ[{1,2,3},3]//Trace {{MemberQ[{1,2,3},3],True},!True,False} The second statement (without Trace) outputs False, but the first yields nothing. Bobby On Sun, 10 Apr 2005 06:55:02 -0400 (EDT), DongGook Park <dgpark6 at sunchon.ac.kr> wrote: > > Hi, > > Could you explain a mysterious behaviour of "! operator" as shown below? > > > In[43]:= > MemberQ[{1,2,3},3] > > Out[43]= > True > > In[47]:= > !MemberQ[{1,2,3},3] > (* Here Mathematica does not give any response! *) > > In[48]:= > Not@MemberQ[{1,2,3},3] > > Out[48]= > False > > > Considering the description from Mathematica help: > "!expr is the logical NOT function. It gives False if expr is True, > and True if it is False." > This behaviour seems quite suspicious? > > > DongGook > > > ---------------------------------- > DongGook Park, > School of Information Technology, > SunChon University, Korea > Telephone: +82 61 750 3597 > Mobile: +82 18 732 2125 > Home page: http://www.dgpark6.com/ > Email: dgpark6 at sunchon.ac.kr > > > > > -- DrBob at bigfoot.com
- References:
- ! operator
- From: "DongGook Park" <dgpark6@sunchon.ac.kr>
- ! operator