Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10261 > unrolled thread

I can not find all the contexts through the command "Contexts[]".

Started byichi <mune9518@gmail.com>
First post2012-05-30 08:12 +0000
Last post2012-05-31 06:53 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  I can not find all the contexts through  the command "Contexts[]". ichi <mune9518@gmail.com> - 2012-05-30 08:12 +0000
    Re: I can not find all the contexts through  the command "Contexts[]". Szabolcs Horvát <szhorvat@gmail.com> - 2012-05-31 06:53 +0000

#10261 — I can not find all the contexts through the command "Contexts[]".

Fromichi <mune9518@gmail.com>
Date2012-05-30 08:12 +0000
SubjectI can not find all the contexts through the command "Contexts[]".
Message-ID<jq4kor$ftv$1@smc.vnet.net>
Hi,
I am using the Mathematica version4.
According to the help browser, the command "Contexts[]" must have shown
a context list that includes all the contexts.
But all the contexts are not shown in it. 

For example, after checking by running "$Context" that has shown "Global`", "Global`" could not be found in the list that was made by "Contexts[]" .
What should I do?

[toc] | [next] | [standalone]


#10284

FromSzabolcs Horvát <szhorvat@gmail.com>
Date2012-05-31 06:53 +0000
Message-ID<jq74h8$qkb$1@smc.vnet.net>
In reply to#10261
On 2012.05.30. 10:12, ichi wrote:
> Hi,
> I am using the Mathematica version4.
> According to the help browser, the command "Contexts[]" must have shown
> a context list that includes all the contexts.
> But all the contexts are not shown in it.
>
> For example, after checking by running "$Context" that has shown "Global`", "Global`" could not be found in the list that was made by "Contexts[]" .
> What should I do?
>


If there are no symbols that are part of the Global` context, then the 
context is considered not to exist, and Contexts[] will not return it.

In[]:= Quit (* restart kernel *)

In[]:= MemberQ[Contexts[], "Global`"]
Out[]= False

First create a symbol:

In[]:= sym
Out[]= sym

Then try again:

In[]:= MemberQ[Contexts[], "Global`"]
Out[]= True

-- 
Szabolcs Horvát
Visit Mathematica.SE:  http://mathematica.stackexchange.com/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web