Ask Your Question
0

how to kill a variable

asked 2016-09-19 10:02:01 +0100

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-09-19 10:31:20 +0100

daniele gravatar image

updated 2016-09-20 08:49:30 +0100

Use "reset" command:

reset('f')

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

edit flag offensive delete link more

Comments

1

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

paulmasson gravatar imagepaulmasson ( 2016-09-19 22:46:59 +0100 )edit

Thank you so much. It worked!

Sha gravatar imageSha ( 2016-09-20 01:45:46 +0100 )edit

@paulmasson: thanks, corrected!

daniele gravatar imagedaniele ( 2016-09-20 08:49:21 +0100 )edit

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: 2016-09-19 10:02:01 +0100

Seen: 501 times

Last updated: Sep 20 '16

Related questions