Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Bug in "Find Previous"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127496] Re: Bug in "Find Previous"
  • From: Helen Read <readhpr at gmail.com>
  • Date: Mon, 30 Jul 2012 03:45:24 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <jv2nc9$meg$1@smc.vnet.net>

For me (8.0.4, Windows) it finds all the unquoted single n searching for 
Whole Words with Find Next. It doesn't get either 'n' or "n" which one 
could argue either way. Using Find Previous, the Whole Words match seems 
quite flaky. It does find the single n with or without quotes, but it 
also picks out the n in some but not all words containing n. For 
example, it skips "found" and "definition" but hits the n in the "in" 
"And" and "any". It skips the n in the unquoted "not" but hits the n in 
the quoted "not".

I also tried appending the following to your text:

Now search Whole Words for instances of not. Did you notice it misses 
some cases of 'not' with Find Previous?

Then I searched for Whole Word matches 'not' with Find Next and Find 
Previous. Find Next gets all of the unquoted instances of 'not' and 
correctly skips over 'notice'. Find Previous also skips over 'notice' as 
it should, and hits all the quoted and unquoted instances of not until 
it gets to the one with double quotes, and then it stops and does not 
hit the two preceding cases.

Turning off the Whole Words match gets all instances of 'not' whether 
quoted or unquoted (including the substring of 'notice') searching in 
either direction.

It seems that the Whole Words mode is a bit unreliable.

Helen Read

On 7/29/2012 3:05 AM, James Stein wrote:
> Copy these seven lines into a cell as "Plain Text",
> (NOT as the default "Mathematica Input").
> Test searching for n as a single word (not in "not", e.g.).
> You should find this n but not any 'n' in not any !
> Do you see the difference searching forward or backward?
> And what is the definition of 'word' in 'Full Word'?
> Why is this 'n' not found?  What about "n"?
>
> This bug may be platform specific.
> I'm running Mathematica 8.0.4 on Mac OS X 10.6.8.
>






  • Prev by Date: Re: mac new OS "mountain lion", compile function, C compiler (vrs. 8.0.4)
  • Next by Date: Re: Mathematica as a New Approach to Teaching Maths
  • Previous by thread: Bug in "Find Previous"
  • Next by thread: Manipulate a Plot of Evaluate DSolve