#2799 feature request

kill (5)
dan hayes

It would be helpful if there were a way to detect if a user defined symbol has been used before because often i want to kill certain symbols that i have used before because of the bugs in function definitions in Maxima and can't remember exactly what all i have defined prior and I don't want to have to kill(all) or restart maxima. And for example if i use command for i thru 5 kill(ket[i]) and it so happens that i have not yet defined the symbol it comes back with error when it should just ignore it and not give an error. Right now there is no way to get around this because for one the atom command also does not work as it should. As I put in command is(ket[5],atom) and instead of coming back as no if i have not yet defined it it comes back unknown.


  • Robert Dodier

    Robert Dodier - 2014-08-25
    • labels: --> kill
  • Robert Dodier

    Robert Dodier - 2014-08-25

    Because kill quotes (does not evaluate) its argument, for i thru 5 do kill(ket[i]) doesn't have the effect you want. To kill any and all values of ket[something] just do kill(ket). If there are no such values, kill(ket) does nothing (with no error message).

    I agree that the current behavior isn't too helpful, but to complicate the picture, a subscripted argument to kill might be a list or matrix or Lisp array, and I don't know if kill should try to kill individual elements of such values, or if it should silently ignore them, or give an error.


Log in to post a comment.