# Peculiar behavior of font end with different evaluation result of same variable

I encountered a peculiar situation. I made a gif showing the problem.

You can see variable eig is different, after I created a new cell and simply reevaluated it. It seems that it substitute previous value of bandmix and delt. But I already cleared these two variables, as you can see they are all blue. What is going on here?

• Nope... can't see anything. Post code (not images). – David G. Stork Jan 21 '18 at 3:08
• Can we assume you've tried restarting the kernel? – aardvark2012 Jan 21 '18 at 4:46
• @aardvark2012 No, on the contrary, I tried not to destroy this buggy state, so that if someone have some ideas to check something, I can do some following check. – matheorem Jan 21 '18 at 4:56
• Hi, @David G. Stork, but I am afraid this buggy front end problem can not be checked with copying code. Because the code is quite normal – matheorem Jan 21 '18 at 4:58
• @matheorem Is there any chance, you have a Manipluate or DynamicModule that is not shown in the screenshot? – halirutan Jan 21 '18 at 5:43

Here is a minimal example of what I believe happens. Consider a useless dynamic that sets a global variable test

Manipulate[
test = t,
{t, 5, 10}
]


After evaluating this, you can move the slider and test is set appropriately. If you use the global variable test in a new cell, it will, of course, have this value. Now, let's say you do ClearAll[test] in a cell like you did, then test is un-set, but as soon as the dynamic content get's re-evaluated, it has again the slider value.

This seems to be happening for you. You clear your delt and bandmix and can calculate the expression. But then, something triggers a re-evaluation of one of your Manipulates at which point the variable get values again.

If this is the case, I hope you have learned your lesson about global variables. You can always use DynamicModule inside Manipulate to scope local variables.

• Thank you so much. This solves problem. – matheorem Jan 21 '18 at 14:52