Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Phantom Error Messages in v9
Posted:
Dec 6, 2012 4:57 AM


*Mathematica* v9 can produce error messages during the evaluation of the * next* line to be evaluated!
Yes, that statement seems nonsensical. Read on:
(*Mathematica* v9.0.0.0 running on MacBook Pro with OS X 10.6.8)
I have placed a notebook with instructions and code to demonstrate these errors at https://www.dropbox.com/s/3w5e1fb834av5wp/RETURN%20BUG.nb
otherwise you may observe them from scratch with these instructions:
Enter the following four lines into a new cell:
Clear[sum2];
sum2::usage="f[*a,b*] returns *a+b*";
sum2[a_,b_]:=Module[{},a+b];
sum2[1,2]
The use of some italics in line 2 is important!
1. Evaluate that cell.
the output value, 3, appears;
note the number of the Output Cell;
if this is the first input cell to be evaluated in your session,
then the output cell withh be Out[4].
2. Double click on "sum2".
3. Press the forward arrow key,
4. Seven error messages now appear! These messages, in the *Messages*window, are:
StringMatchQ::strse: String or list of strings expected
at position 1 in StringMatchQ[$Failed,sum2*]. >>
StringMatchQ::strse: String or list of strings expected
at position 1 in StringMatchQ[$Failed,sum2*]. >>
StringMatchQ::strse: String or list of strings expected
at position 1 in StringMatchQ[$Failed,sum2*]. >>
General::stop: Further output of StringMatchQ::strse
will be suppressed during this calculation. >>
(Then, after a slight pause without user doing anything):
The String "f[
The string "FontSlant>"Italic"]
The string "FontSlant>"Italic"]
You will notice that the first four messages occurred "During evaluation of In[5], despite the fact that there is not yet any Input cell with that number (which you can confirm by clicking in some empty place in the notebook, entering a simple expression (such as 1+1) and evaluating).



