MathGroup Archive 2006

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

Search the Archive

Re: Re: variable "K"? (Really strange behavior . . . )

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69210] Re: [mg69182] Re: variable "K"? (Really strange behavior . . . )
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Fri, 1 Sep 2006 18:41:20 -0400 (EDT)
  • References: <ed6918$jho$1@smc.vnet.net> <200609011041.GAA25571@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

They probably didn't protect K because it is usually only associated
with some type of automatic output - such as an integration dummy
variable. Even then, it usually appears in a unique form like K$12312.
I think it would be okay for you to assign K a value if you wanted to.

On 9/1/06, AES <siegman at stanford.edu> wrote:
> Final comments (my final comments, anyway) on the "strange behavior of
> K" observation I posted:
>
> 1)  The explanation clearly lies in the two responses appended below
> (and thanks).
>
> 2)  Some further exploration on my part seems to show that the 7 single
> capital letters  C  D  E  I  K  N  O  all have (at present, anyway) one
> or another form of special "system" meaning in Mathematica.  Six of
> these 7 letters (all but K) also share the properties that they
>
>     (a) Have an entry in the online Help system, and
>
>     (b) Issue a "Protected" warning if you try to use them as symbols.
>
> Unfortunately, K has neither of these attributes, which makes it much
> less apparent to non-experts that using it as a symbol name will cause
> bizarre difficulties -- especially since all the other 19 single
> capitals can apparently be used as symbols without trouble.
>
> 3)  It might might be nice if Wolfram would Protect and/or include in
> the online Help system *all* the special symbols in the entire system.
> But, this may be difficult technically (?), and leaves open the chance
> for some of these special symbols to get inadvertently omitted.
>
> So, despite the attractions of writing an optics notebook using the
> standard notation of  "a" for radius of a circular fiber, "v" for its
> fiber v parameter, "A" for its cross sectional area, "V" for its volume,
> and "K" as the standard notation for the thermal conductivity of glass,
> I guess the safest course is for the user to conform to the computer,
> and never use a capital letter as the initial letter of a symbol.
>
> =====================================================
> Notice the usage message for K. This is because K is a System symbol:
>
> In[2]:= Context[K]
>
> Out[2]= System`
>
> Carl Woll
> Wolfram Research
> =====================================================
> The answer seems to be that K's Context is System, not Global, and unlike
> many System symbols it is not Protected, which is why it could be set to
> 0.6. In fact, of the 1984 symbols in System (in version 5.2)  515 are not
> protected, and K is one of those:
>   Length[Select[Names["System`*"], FreeQ[Attributes[#], Protected] &]]
> Luckily, things like Pi, E and I are protected!
>
> Dr A.H. Harker
> Department of Physics and Astronomy
> University College London
> =====================================================
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Re: variable "K"? (Really strange behavior . . . )
  • Next by Date: RE: Mathmatica StyleSheet questions
  • Previous by thread: Re: Re: variable "K"? (Really strange behavior . . . )
  • Next by thread: Re: Re: variable "K"? (Really strange behavior . . . )