Code: Select all
(setq j (array 256 '(-1)))
(setq str "abc")
(char (str 1))
;-> 98
(integer? (char (str 1)))
;-> true
Using the number 98 works:
Code: Select all
(setf (j 98) 2)
;-> 2
Code: Select all
(setq idx (char (str 1)))
;-> 98
(setf (j idx) 2)
;-> 2
Code: Select all
(setf (j (char (str 1))) 2)
;-> ERR: string expected : 2
Code: Select all
(setf (j (char (str 1))) "2")
;-> "2"