문제

I see in the CLISP implementation notes the availability of #'read-char-sequence and #'read-byte-sequence. Hot stuff.

But is it possible to seek to a particular point in a file before doing the desired reading?

I've searched both Steele's Common Lisp the Language and the CLISP implementation notes, and not found an answer.

도움이 되었습니까?

해결책

You can use file-position.

(file-position my_stream)

This returns the current position in the file.

(file-position my_stream n)

This sets it to the nth position.

However there are sometimes problems with using this in Unix. Make sure you do not go beyond EOF.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top