Execute Brain****/Common Lisp: Difference between revisions

Content added Content deleted
m ((float edit in strange pos, ... fixed?))
(remove indentation that shows up in string)
Line 10: Line 10:
(defun adjust-memory (state)
(defun adjust-memory (state)
"Modifies memory and memory-pointer such that memory-pointer is
"Modifies memory and memory-pointer such that memory-pointer is
a valid index to the memory array. If it is too large, the array
a valid index to the memory array. If it is too large, the array
is extended; if it is negative, the array is extended, its
is extended; if it is negative, the array is extended, its
contents are shifted forward and the memory-pointer is incremented,
contents are shifted forward and the memory-pointer is incremented,
by an amount to make the memory ."
by an amount to make the memory ."
(cond ((>= (bf-state-memory-pointer state)
(cond ((>= (bf-state-memory-pointer state)
(length (bf-state-memory state)))
(length (bf-state-memory state)))