Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Information about non-symbol heads

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6255] Re: [mg6152] Information about non-symbol heads
  • From: Jason Harris <jasonh>
  • Date: Mon, 3 Mar 1997 01:29:08 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

In article <5er8p5$7dh at smc.vnet.net>, hanson at physics.auburn.edu (James D
Hanson) wrote:

> How can I get Mathematica 3.0 to tell me what it knows about non-symbolic
> heads? To explain what I mean, take a look at a symbolic head. I define b
> as a function, the function works, and when I ask Mma about it it tells me
> the definition.

> So far, so good. Now, suppose I want to use a subscripted variable. I
> define the function the same way, and it works.
>
> In[4]:=
> \!\(a\_0[x_]\  := \ x^4\)
>
> In[5]:=
> \!\(a\_0[2]\)
>
> Out[5]=
> 16
>
>
> But now, when I ask about it, Mma replies that my subscripted variable is
> not a symbol or a string.

Unfortunately the definition is located under Subscript i.e. ?Subscript
will give you the definition.

The better way to get around this is to use the Notation package. It will allow
you to easily do this. There is a demonstration of the package under the
help browser Demos -> Notation Maker.

You load the package with <<Utilities`Notation`

Just see the documentation and you will see how to symbolize a\_O, then the
request you are making above is easy.

There is an update to the Notation package which is about to be announced
by me at http://wolfram.com/~jasonh/Notation.html (The code is complete but
the documentation might change a little.)

Cheers,

   Jason




  • Prev by Date: Re: strings & expressions in Module
  • Next by Date: Saving edited packages
  • Previous by thread: Plotting a 3D Cloud of Points
  • Next by thread: Saving edited packages