MathGroup Archive 2010

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

Search the Archive

Re: FunctionQ?


On 10/21/2010 10:37 PM, Sam Takoy wrote:
> Hi,
>
> How does one tell whether a variable is a function?

one way, for Mathematica functions:

isFunction[name_String]:=If[Length[SyntaxInformation[Symbol[name]]]>0,True,False]

isFunction["Plot"]
True

isFunction["LinearSolve"]
True

isFunction["mikeyMouse"]
False

isFunction["Joined"]
False

For the rest may be ? and ?? can be of help.

> More specifically, how does one tell whether a variable is a function of
> two arguments?
> Finally, how does one tell whether a variable is a function of two
> arguments that returns an array?
>
> Many thanks in advance,
>
> Sam
>

--Nasser



  • Prev by Date: Re: Two questions related to Arrays
  • Next by Date: Re: From list to list of arguments
  • Previous by thread: FunctionQ?
  • Next by thread: Re: FunctionQ?