|
[Date Index]
[Thread Index]
[Author Index]
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[1]:=
> b[x_] := x^2
>
> In[2]:=
> b[2]
>
> Out[2]=
> 4
>
> In[3]:=
> ?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[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.
>
> In[6]:=
> \!\(\(?a\_0\)\)
>
> \!\(Information::"ssym" \( : \ \) "\!\(a\_0\) is not a symbol or a string."\)
>
> Out[6]=
> \!\(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.
Prev by Date:
contexts,packages,names: again!
Next by Date:
Re:Solving non-linear equations
Previous by thread:
Re: contexts,packages,names: again!
Next by thread:
Re: Information about non-symbol heads
|