Message Boards Message Boards

Unexpected clearing of the variables. Is it a bug?

Dear all,

I have observed that in Mathematica 10.0 sometimes the variables are unexpectedly cleared when they are used. This did not happen in previous versions of Mathematica. I enclose an example of .nb file where this happens. (The last two input lines are not properly executed).

I have observed that this does not happen when the Clear[] command of the variables in question are not put in the same cell as that of the definition of the variables.

But I have the habit of clearing (before) the variables at the same cell where they are defined; as mentioned in previous versions it worked OK.

Could anybody check that the error is reproduced in his/her Mathematica 10.0? Thanks in advance.

Best,

Attachments:
POSTED BY: Arturo Ramos
5 Replies

I am not seeing this behavior (in 10.0.1, on Linux). I can say that, generally speaking, when all definitions have been cleared it is an indication that the kernel has crashed.

POSTED BY: Daniel Lichtblau

Thanks Daniel.

The curious thing is that not all variables are cleared when that happens; so it is not a kernel crash. I use 10.0.1 on Windows, 64 bits. Maybe it is a problem of the Windows versiĆ³n.

POSTED BY: Arturo Ramos

I'm not sure that I understand your "bug", but the last two lines do execute on my machine (10.0.1 in Windows 7 64 bit).

In[1]:= $Messages=.
In[2]:= Clear[sp1900,sp1900d]
sp1900=Table[i,{i,1,8000}];
sp1900d=Module[{t},t=Sort[sp1900];Table[{t[[i]],Length[t]-i+1},{i,1,Length[t]}]];
In[5]:= Clear[sp1900dsc,sp1900sc]
sp1900dsc=Drop[sp1900d,0] ;
sp1900sc=Drop[sp1900,0] ;
In[8]:= sp1900sc[[1]]
sp1900sc[[Length[sp1900sc]]]
Out[8]= 1
Out[9]= 8000
POSTED BY: Tim Mayes
POSTED BY: Arturo Ramos

With the new version 10.0.2 of Mathematica this issue seems to have been solved. Thanks to the people of Wolfram Research!

POSTED BY: Arturo Ramos
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract