Ask Your Question
0

how to kill a variable

asked 2016-09-19 03:02:01 -0600

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 03:31:20 -0600

daniele gravatar image

updated 2016-09-20 01:49:30 -0600

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 15:46:59 -0600 )edit

Thank you so much. It worked!

Sha gravatar imageSha ( 2016-09-19 18:45:46 -0600 )edit

@paulmasson: thanks, corrected!

daniele gravatar imagedaniele ( 2016-09-20 01:49:21 -0600 )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 03:02:01 -0600

Seen: 115 times

Last updated: Sep 20 '16

Related questions