You are doing something terribly wrong.
defvar and defparameter are
"top-level" forms.
There is no reason to use them inside a function.
What you might want to do is something like
(defvar *param*)
(defun assign-param (x)
(setq *param* (generic-funct x))
'*param*) ; so that `assign-param` returns the symbol instead of the new value, like `defvar`
However, your last question about param1, param2 &c makes little
sense (yes, it is possible to do it, and, no, you do not want to do it).
What you might want to be doing
You appear to want to have a set of global parameters, set dynamically from, say, environment or a config file.
There are two main way to do this: hash tables and packages.
Simple and straighforward; associate any value with any string:
(defvar *parameters* (make-hash-table :test 'equal))
(defun param-value (param-name)
(gethash param-name *parameters*))
(defun (setf param-value) (new-value param-name)
(setf (gethash param-name *parameters*) new-value))
(param-value "foo")
==> NIL; NIL
(setf (param-value "foo") "bar")
==> "bar"
(param-value "foo")
==> "bar"; T
(defun delete-param (param-name)
(remhash param-name *parameters*))
Note that you should modify param-value to signal an error if the second value of gethash is nil, i.e., the parameter does not exist.
More involved, but you can associate more "stuff" with your parameter objects:
(defvar *parameters* (make-package "parameters" :use ()))
(defun param-value (param-name)
(multiple-value-bind (param status) (find-symbol param-name *parameters*)
(unless status
(error "Parameter %s does not exist" param-name))
(symbol-value param)))
(defun (setf param-value) (new-value param-name)
(setf (symbol-value (intern param-name *parameters*)) new-value))
(defun delete-param (param-name)
(multiple-value-bind (param status) (find-symbol param-name *parameters*)
(when status
(unintern param))))
The major advantage of this approach is the integration of read with the packages which would make config file parsing easier.
A minor advantage is that you can store not just a value, but also a function and a property list in your parameter.