Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: FunctionQ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113324] Re: FunctionQ?
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Sat, 23 Oct 2010 07:07:57 -0400 (EDT)
  • References: <i9r7vd$hoo$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

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?