Here' a function I have.
(defun add-word-2 (n line)
(let ((temp-word (make-array 0 :element-type 'character
:fill-pointer 0
:adjustable t)))
(vector-push-extend (char line n) temp-word)
(loop
(if (or (char= #\newline (char line (+ n 1)))
(char= #\space (char line (+ n 1))))
((vector-push-extend temp-word *word-array-2*)(return-from add-word-2 n))
((incf n)(vector-push-extend (char line n) temp-word))))))
I believe it's getting down to the bottom inside the if function after an evaluation to false. The error I get is:
Error: Illegal function object: (INCF N).
[condition type: TYPE-ERROR]
Is this a scope issue, does the n still exist inside the let function? Not really sure what that error means.