I'm running two bits of code that I thought would do the exact same thing. One crashes, the other doesn't.
The working one:
The non-working one:
So, without going into detail about what add_rand_circuit does, can somebody tell me if there is some sort of, I dunno, size limit or other significant difference between a global variable and a local variable? The same thing happens if I replace "pool" in the "meh" function with a let variable.
Thanks a mil,
Siggy
The working one:
(loop for i from 0 to 20 do (setf *pool* (add_rand_circuit *needs_pool* *pool*)))
Where *pool*, of course, is global.The non-working one:
(defun meh (pool) (loop for i from 0 to 20 do (setf pool (add_rand_circuit *needs_pool* pool))))
(setf *pool* (meh *pool*))
Which crashes (if you must know, it's "*** - +: NIL is not a number").So, without going into detail about what add_rand_circuit does, can somebody tell me if there is some sort of, I dunno, size limit or other significant difference between a global variable and a local variable? The same thing happens if I replace "pool" in the "meh" function with a let variable.
Thanks a mil,
Siggy