I have defined usage statements for a few symbols, e.g., foo::usage="This is how to use foo";
If I type ? foo
or Information[foo]
, I get in return a nicely formated cell with the string information. However, the command returns Null:
t = Information[foo];
FullForm[t]
My question: How can I get the usage statement and store it in a new variables? I could of course do foo::usage
, but let's say I have a list of symbols, lst = {foo, fii};
, how could I map #::usage
to all these symbols?
t=foo::usage
huh? $\endgroup$(#::"usage")&/@lst
should work. $\endgroup$MessageName[]
for this:MessageName[#, "usage"] & /@ {General, Sin}
. $\endgroup$