Message Boards Message Boards

0
|
7901 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Erase saved Values ?

Posted 6 years ago

Hi, in a Notebook, I defined some constants by numerical values. But I cannot erase that definition. Neither by opening a new Notebook, nor by using the command "Clear". Does someone know how to do that?

POSTED BY: Jonas Hamp
3 Replies

Perhaps you are troubled that the symbol a remains even after you use Clear on it:

    Names["Global`*"]
{}
    a = 1;
    Clear[a]
    Names["Global`*"]
{a}

In that case, you could use Remove instead of Clear:

    Remove[a]
    Names["Global`*"]
{}
POSTED BY: Murray Eisenberg
Posted 6 years ago

Thank you very much, the "Remove" Command works very well. Have a nice day.

POSTED BY: Jonas Hamp

What did you do exactly with Clear? This way works for me:

a = 1;
Clear[a]

Another way:

a = 1;
a =.

A more drastic Clear, that wipes out all symbols in the Global context:

Clear["Global`*"]
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