[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Questions, comments and clarifications on clarifications
- To: gls@THINK-AQUINAS.ARPA, common-lisp@SU-AI.ARPA
- Subject: Questions, comments and clarifications on clarifications
- From: Daniel L. Weinreb <DLW@SCRC-QUABBIN.ARPA>
- Date: Mon, 16 Dec 85 14:05 EST
- In-reply-to: <851216130145.5.GLS@THINK-JEHOSEPHAT.ARPA>
Date: Mon, 16 Dec 85 13:01 EST
From: Guy Steele <gls@THINK-AQUINAS.ARPA>
Sorry it wasn't clean. FILE-LENGTH is defined to return the length of a
file measured in units of ELEMENT-TYPE. FILE-LENGTH now is guaranteed
to work only on an open stream, and it uses the ELEMENT-TYPE specified
when the stream was opened. The proposal is to allow FILE-LENGTH to
take any pathname, but in that case it may be necessary to specify an
ELEMENT-TYPE explicitly in order to get the answer you want.
If this is what you mean, it should be made clear that (1) the model of
a "file" is that it has a single associated element-type, and (2) if you
use the new form of file-length, and you pass in :element-type, then the
value must be the same as the actual element-type of the file, or else
it is an error (the result is undefined).
(Put more crudely, there should be no defined way to write a file in
units of X and then ask for its length in units of Y, that claims to be
portable.)