Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Putting ??symbol in a cell and another expression in a different row of the cell returns the following error:

1 + 2

Information::ssym: symbol 1+2 is not a symbol or a valid string pattern. >>

Information[symbol 1+2,LongForm->True]

But this does not happen with ?symbol:




Why does this happen?

share|improve this question
Some parsing confusion on the FE? One can clearly see this since ??NDSolve followed by 1+2 on new line gives Information[NDsolve 1 + 2, LongForm -> True] but this does not show up with the short form (default) version of Information which is ? – Nasser Aug 16 '13 at 9:11
up vote 5 down vote accepted

Somewhat tautologically we can demonstrate that the Front End parses these differently:

parseString[s_String, prep : (True | False) : True] := 
  FrontEndExecute[UndocumentedTestFEParserPacket[s, prep]] 

{BoxData[{RowBox[{"?", "Sin"}], RowBox[{"2", "+", "2"}]}], StandardForm}

{BoxData[RowBox[{"??", RowBox[{RowBox[{"Sin", "2"}], "+", "2"}]}]], StandardForm}

A question remains as to why. Without any support I am going to suppose that the behavior of ?? is desired but that it was not extended to ? because that operator is also used for PatternTest.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.