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 2000

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

Search the Archive

Re: Counting the total number of available Mathematica commands ?

  • To: mathgroup at
  • Subject: [mg22896] Re: Counting the total number of available Mathematica commands ?
  • From: "Allan Hayes" <hay at>
  • Date: Tue, 4 Apr 2000 22:41:01 -0400 (EDT)
  • References: <8c69iv$>
  • Sender: owner-wri-mathgroup at

This thread has raised some interesting issues.

Re: David's posting

Names["*"] will give all names in contexts on the current context path,
given by $ContextPath (at start up I get  {"Global`", "System`"} ). it will
give only their short names, "Plot" instead of  the long name "System`Plot".

Names[] will give the names in all the current contexts given by Context[]
whether or not they are on the current context path. It will give short
names for those on the current context path and long name for the others.

Re: Jens's posting


nlist = Names["*"];

optandfun =
    First /@ Select[{#, ToExpression[#]} & /@ nlist,
        First[#] == ToString[Last[#]] &];

we find that the new symbol nlist is included:

MemberQ[nlist, "nlist"]


And (with needed parentheses added)

onlyopt =
      ToString /@ (Flatten[
              Options[ToExpression[#]] & /@ optandfun] /. {Rule[a_, b_] :>
              Verbatim[RuleDelayed][a_, b_] :> a});

includes "$Failed", which is not an option.

MemberQ[onlyopt, "$Failed"]


This seems to be due to

Options /@ {BoxData, TextData}

        {{$Failed}, {$Failed}}

As Jens mentions, there is a problem with options buried in option values,
like FontFamily and FontColor in
TextStyle -> {FontFamily -> Times, FontColor -> Hue[0]}

The following seems to deal with these two points

onlyopt2 =
    ToString /@
          Flatten[Options[ToExpression[#]] & /@
              optandfun], ( Rule | RuleDelayed)[a_, _] -> a, Infinity]];

We can compare sizes





However, as  Jens points out, we still have the issue of what a function is.

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

  • Prev by Date: Re: 9^(9^(9^9))
  • Next by Date: Timing[] holes?
  • Previous by thread: Re: Re: Counting the total number of available Mathematica commands ?
  • Next by thread: Solid geometry matching problem