- Code: Select all
(set-macro-character #\! #'(lambda (s c) (format t "~s:~a~%" c (file-position s)) (values)))
is determined by the standard during reading from a string:
- Code: Select all
(read-from-string "(1 ! 2)")
(set-macro-character #\! #'(lambda (s c) (format t "~s:~a~%" c (file-position s)) (values)))(read-from-string "(1 ! 2)")(defun stream-position (stream)
#+ufasoft-lisp
(if (string-stream-p stream)
(string-input-stream-index stream)
;; else
(file-position stream))
#-ufasoft-lisp
(file-position stream))
Users browsing this forum: Bing [Bot] and 2 guests