Re: Re: ! operator
- To: mathgroup at smc.vnet.net
- Subject: [mg55943] Re: [mg55933] Re: [mg55927] ! operator
- From: DrBob <drbob at bigfoot.com>
- Date: Mon, 11 Apr 2005 03:14:52 -0400 (EDT)
- References: <200504110307.XAA06436@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Hmm... what does "text-based front end" mean, and is there another kind? Is the standard notebook interface a text-based front end? What's an example of a non-text-based front end for Mathematica? Trace suggests !expr is interpreted the same as Not[expr] for SOME expressions, at least: !PrimeQ[12]//Trace {{PrimeQ[12],False},!False,True} But, indeed, if I input: !True a DOS window comes up briefly and disappears before I can tell what's up. This is a huge surprise to me. Type this to see the DOS window more clearly: !pause Or better yet, !cmd However, if I input !PrimeQ[12] there is no fleeting DOS window, and still no Output cell. Is that because cmd is a DOS command, but PrimeQ[12] isn't? Can Mathematica be certain of this? (True isn't a DOS command, after all.) Does "escape sequence" mean "DOS command"? No, I guess not, since !dir>dum.txt doesn't pipe directory contents to a file called "dum.txt". (It doesn't do anything at all, as far as I can tell.) So... what's really going on, I wonder? Bobby On Sun, 10 Apr 2005 23:07:10 -0400 (EDT), David Park <djmp at earthlink.net> wrote: > DongGook, > > Read the rest of the Help for Not, at least on Version 5... > > 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. > > (Certainly a strange 'feature'!) > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > From: DongGook Park [mailto:dgpark6 at sunchon.ac.kr] To: mathgroup at smc.vnet.net > To: mathgroup at smc.vnet.net > > > 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:
- Re: ! operator
- From: "David Park" <djmp@earthlink.net>
- Re: ! operator