Re: Information about non-symbol heads
- To: mathgroup at smc.vnet.net
- Subject: [mg6162] Re: [mg6152] Information about non-symbol heads
- From: seanross at worldnet.att.net
- Date: Thu, 27 Feb 1997 02:52:02 -0500
- Sender: owner-wri-mathgroup at wolfram.com
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. > > In:= > b[x_] := x^2 > > In:= > b > > Out= > 4 > > In:= > ?b > > "Global`b" > > b[x_] := x^2 > > So far, so good. Now, suppose I want to use a subscripted variable. I > define the function the same way, and it works. > > In:= > \!\(a\_0[x_]\ := \ x^4\) > > In:= > \!\(a\_0\) > > Out= > 16 > > But now, when I ask about it, Mma replies that my subscripted variable is > not a symbol or a string. > > In:= > \!\(\(?a\_0\)\) > > \!\(Information::"ssym" \( : \ \) "\!\(a\_0\) is not a symbol or a string."\) > > Out= > \!\(Information[a\_0, LongForm \[Rule] False]\) > > So, is there any way to get Mma to tell me the information about a_sub_0? > > -- > James D. Hanson ph. (334) 844-5044 > Department of Physics fax (334) 844-4613 > 206 Allison Laboratory > Auburn University, AL 36849-5311 hanson at physics.auburn.edu Type ??symbolname and mathematica will display the definition. Alternately, the mathematica book explains how to set up a package and use the symbolname::usage=" " and you can specify a text message that will be displayed when you type ?symbolname.