Re: Output a list of keywords
- To: mathgroup at smc.vnet.net
- Subject: [mg63233] Re: Output a list of keywords
- From: "Dr. Wolfgang Hintze" <weh at snafu.de>
- Date: Tue, 20 Dec 2005 04:19:30 -0500 (EST)
- References: <do67v4$aus$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Thank you, Bob.
With the slight modification replacing
{noms = Select[Names["*`*"],StringFreeQ[#, "`"]&]}
by
{noms = Select[Names["*`*"], StringPosition[#, "`"] == {} &]}
your Module works also for Version 4.
Wolfgang
Bob Hanlon wrote:
> This is close to what you asked for.
>
> myFunction[x_]:=Sin[x]
>
> (* The following should be the last cell in the notebook *)
> Module[{
> noms=Select[Names["*`*"],StringFreeQ[#, "`"]&]},
> Union[Cases[Drop[
> NotebookGet[EvaluationNotebook[ ]][[1]],-1],
> _?(MemberQ[noms, #]&),Infinity]]]
>
> {Input,myFunction,Sin,x}
>
>
> Bob Hanlon
>
>
>>From: "Dr. Wolfgang Hintze" <weh at snafu.de>
To: mathgroup at smc.vnet.net
>>Date: 2005/12/17 Sat AM 03:46:19 EST
>>Subject: [mg63233] Re: Output a list of keywords
>>
>>Interesting question. May I add a specific question which fits the
>>topic: how do I get a list of the keywords used *directly* in my
>>specific notebook?
>>
>>E.g. for the notebook containing only the following line
>>
>>myFunction[x_]:=Sin[x]
>>
>>the list should read
>>
>>myFunction
>>Sin
>>
>>This sometimes arises when I need to transform programs from one
>>
> version
>
>>to the other and need to replace unknown functions.
>>
>>Thanks in advance.
>>
>>Regards,
>>Wolfgang
>>
>>Thomas Guignard wrote:
>>
>>
>>>Hi there
>>>
>>>Does anybody know of a way to output a list of all reserved keywords in
>>>Mathematica (such as the listing in Section A.10 of the Mathematica
>>>
> book)?
>
>>>Thanks,
>>>Thomas
>>>
>>>
>>>
>>
>