Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: functions that take a specified option

  • To: mathgroup at
  • Subject: [mg783] Re: functions that take a specified option
  • From: Lou Talman <me at>
  • Date: Wed, 19 Apr 1995 00:27:50 -0400

The "Names" operator (whose existence had escaped me until I saw Dan  
Wagner's posting) obviates the need for a package to solve the problem of  
locating commands that admit certain options or that have certain  
attributes.  I had thought of a package because the only way I knew to get  
my hands on what "Names" provides was so clumsy that I wanted to embed the  
result in the package.  The following does very nicely:

CurrentDefinitionList := Names[];

CommandList := Select[CurrentDefinitionList, 

                       (!StringMatchQ[#, "$*"])&];

FindOption[name_] := Block[{dummy},Select[CommandList,  

  (dummy = ToExpression[#]; 

       MemberQ[Options[dummy], name -> _]
           || MemberQ[Options[dummy], name :> _])&]];

FindAttribute[name_] := 


         MemberQ[Attributes[#], name]&];   

  • Prev by Date: Good Mathematica book suggestions
  • Next by Date: Re: Re: Lyapunov Equation
  • Previous by thread: Re: Good Mathematica book suggestions
  • Next by thread: Large data sets?