Re: "K" is a System` Symbol
- To: mathgroup at smc.vnet.net
- Subject: [mg36178] Re: "K" is a System` Symbol
- From: Selwyn Hollis <slhollis at earthlink.net>
- Date: Mon, 26 Aug 2002 04:15:55 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Mark:
In: ?K
Out: K is a default generic name for a summation index in a symbolic sum.
Turns out that there are seven single-letter symbols.
In: ClearAll["Global`*"];
Select[Names["*"], (StringLength[#] == 1) &]
Out: {C, D, E, I, K, N, O}
K is a little weird, because it's not Protected.
In: Attributes[{C, D, E, I, K, N, O}]
Out: {{NHoldAll, Protected}, {Protected, ReadProtected},
{Constant, Protected, ReadProtected}, {Locked, Protected,
ReadProtected}, {}, {Protected}, {Protected, ReadProtected}}
----
Selwyn Hollis
Mark Fisher wrote:
> I just learned that K is a System` Symbol:
> > Information[K]
> Context[K]
> > I learned this due to an error message:
> > Block[{K = 1}, Sum[j, {j, i}]]
> > The same message can be generated by the following:
> > K := 1
> Sum[j, {j, i}]
> > The message can be eliminated by Removing K:
> > Remove[K]
> Block[{K = 1}, Sum[j, {j, i}]]
> K := 1
> Sum[j, {j, i}]
> > Surely, this is not intentional.
> > --Mark.
>