Re: Re: Output a list of keywords
- To: mathgroup at smc.vnet.net
- Subject: [mg63211] Re: [mg63187] Re: Output a list of keywords
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 19 Dec 2005 07:01:03 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
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: [mg63211] [mg63187] 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
> >
> >
>
>