Re: ! operator
- To: mathgroup at smc.vnet.net
- Subject: [mg55940] Re: ! operator
- From: Peter Pein <petsie at arcor.de>
- Date: Sun, 10 Apr 2005 23:07:21 -0400 (EDT)
- References: <d3b18l$sgd$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
DongGook Park 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 > > From the documentation (topic: Not): If you are using Mathematica with a text-based front end, then you cannot use the notation !expr for Not[expr] if it appears at the very beginning of a line. In this case, !expr is interpreted as a shell escape. -- Peter Pein Berlin