0

Why is this "Warning: Free reference to undeclared variable ARAD assumed special." popping out?

(defstruct Place()
  (pathCost  10)
  (childName 'none)
)

(setf Arad(make-Place :childName 'Zerind))

(describe Arad)
Michimcchicken
  • 543
  • 1
  • 6
  • 21
  • You didn't declare the variable arad, you just assigned to it. You need to declare a global variable with defparameter or defvar (e.g., **(defparameter \*arad* (make-place ...))**), or declare a local variable with let, e.g., **(let ((arad (make-place ...))) ...)**. – Joshua Taylor Dec 31 '14 at 15:04
  • Turn your CamelCase into lisp-case.. And put spaces after symbols. – enrey Jan 13 '15 at 16:40

0 Answers0