Information[symbol]
shows information about a symbol and is equivalent to ?symbol
.
Information[symbol]
?symbol
Global`symbol
Information[symbol, LongForm -> True]
??symbol
Global`symbol
Using FullForm
with ?symbol
returns the following error:
FullForm[Unevaluated[?symbol]]
Syntax::bktmcp: Expression "Unevaluated[?symbol]]" has no closing "]".
Syntax::sntxi: Incomplete expression; more input is needed .
But using FullForm
with Information[Unevaluated[symbol]]
returns the following expression without any error:
FullForm[Unevaluated[Information[symbol]]]
Unevaluated[Information[symbol,Rule[LongForm,False]]]
Why does this happen?
? x
as argument to a function, since?x
is not a symbol. i.e one can't make a symbol called "?" But The front end FE on the other hand simply parses this for you (it is being nice) and then converts internally toInformation[x]
and that is why it works now as argument toFullForm
but you can't pass "? x" yourself as argument. It is meant to be used just for asking help on the FE only. I mean, only FE can parse this as first token read. Again, only a guess. $\endgroup$