LISP parameter binding

Viewed 499

I have to define a LISP function that assigns to a parameter the result of another function, like this:

(defun assign-param (x)
  (defparameter param (generic-funct x)))

the result of assign-param is PARAM, at the first call. If i do another call, the function assign-param returns again PARAM, but this way:

Warning: (DEFVAR PARAM) defined more than once in 
C:\Users\****\Desktop\****\****.lisp.
PARAM

I tried using defvar instead of defparameter with the same result.

Is there a way to avoid this warning message?

Is there a way to auto-generate other parameters if one already exists? (ex: if param is already in memory, assign to param1, param2...)

2 Answers
Related