I have a function that I'm trying to compile, but I've been pulling my hair out for the last 30 minutes trying to figure out why this code is giving me a Undeclared free variable
error. I'm using Emacs, and cannot decipher why I'm getting this error.
(defun pretty-all(res diff)
(let* ((v-list (blank-unit-list res))
(c-list (blank-unit-list res)))
(complete-fill c-list v-list res (total-res res) diff)
(format t
"Resistance is ~S~% Voltage is ~S~% Current is ~S~%"
res v-list c-list)))
blank-unit-list
, complete-fill
, total-res
are all my custom-defined functions.
I'm pretty sure this error is related to how I structured my code, but as I've said before, I can't figure out what.
Copied from Emacs:
3 compiler notes:
CircuitFunctions.lisp:61:64:
warning: Undeclared free variable RES
CircuitFunctions.lisp:61:70:
warning: Undeclared free variable V-LIST
CircuitFunctions.lisp:61:81:
warning: Undeclared free variable C-LIST
Compilation failed.