Message Boards Message Boards

GROUPS:

Clear variables that appear in multiple contexts?

Posted 3 months ago
724 Views
|
2 Replies
|
1 Total Likes
|

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

2 Replies

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 3 months 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???

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