Message Boards Message Boards

0
|
5731 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Clear variables that appear in multiple contexts?

Posted 5 years ago

How do I rid myself of these annoying messages.

area::shdw: Symbol area appears in multiple contexts {IPOPTLink,Global}; definitions in context IPOPTLink` may shadow or be shadowed by other definitions.

I have used "Clear["Global*"]", but I still get these messages, if I run "Clear["Global"]" again then the message will not appear. If "Clear["Global`"]" works why does it have to be used in every cell???

Sure I could use just Clear or ClearAll, but that means I have to remember every variable I have used and I just want to clear them all, but "Clear["Global`*"]" does not work, so what would work???

For some reason this format drops letters I used Clear [ " Global ` * " ] i put in spaces so the letters and symbols would not get dropped out

POSTED BY: Raymond Low
2 Replies
Posted 5 years ago

Thank you Gianluca, that worked

But, like Clear["Global*"], Remove["Global*"] worked, sometimes, only after the second time I used the command. It was as if Mathematica did not believe me the first time, something like a safety feature, and I had to re-evaluate the cell a second time before it worked, or enter Clear or Remove a second time in a new cell before it worked???

POSTED BY: Raymond Low

You can try Remove, which removes the symbol from the global context. Clear only clears the values, if there are any, but the symbol itself lingers on and triggers messages.

POSTED BY: Gianluca Gorni
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