Ask Your Question
0

how to kill a variable

asked 8 years ago

Sha gravatar image

Earlier I have defined on my Sage that variable f equals to some expression. Later on I no longer need f to be that expression. I just need it to be a variable. I know in PARI we have the function kill(f). I tried that on Sage but it did not work. Can I kill a variable that I have defined earlier on Sage.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 8 years ago

daniele gravatar image

updated 8 years ago

Use "reset" command:

reset('f')

Related question: "How can I clear an assignment to a variable?"

Preview: (hide)
link

Comments

1

Need quotes around variable name: reset('f')

paulmasson gravatar imagepaulmasson ( 8 years ago )

Thank you so much. It worked!

Sha gravatar imageSha ( 8 years ago )

@paulmasson: thanks, corrected!

daniele gravatar imagedaniele ( 8 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 8 years ago

Seen: 530 times

Last updated: Sep 20 '16

Related questions