30.3. General generic functions
Prev | Chapter 30. Gray streams | Next

## 30.3. General generic functions

General generic functions defined on streams

`(`STREAM-ELEMENT-TYPE` `stream`)`

  Returns the stream's element type, normally a subtype of `CHARACTER` or `INTEGER`.

  The method for `GRAY:FUNDAMENTAL-CHARACTER-STREAM` returns `CHARACTER`.

`((`SETF` `STREAM-ELEMENT-TYPE`) `new-element-type` `stream`)`

  Changes the stream's element type.

  The default method `SIGNAL`s an `ERROR`.

  This function is a CLISP extension (see Section 21.7, “Function `STREAM-ELEMENT-TYPE`”).

`(`CLOSE` `stream` `&KEY` `:ABORT`)`

  Closes the stream and flushes any associated buffers.

  When you define a primary method on this function, do not forget to `CALL-NEXT-METHOD`.

`(`OPEN-STREAM-P` `stream`)`

  Returns true before the stream has been closed, and `NIL` after the stream has been closed.

  You do not need to add methods to this function.

`(`GRAY:STREAM-POSITION` `stream` `position`)`

  Just like `FILE-POSITION`, but `NIL` `position` means inquire.

  You must define a method for this function.

`(GRAY:STREAM-READ-SEQUENCE `stream` `sequence` `&KEY` `:START` `:END`)`

  Used by `READ-SEQUENCE`. Deprecated. Define `GRAY:STREAM-READ-CHAR-SEQUENCE` or `GRAY:STREAM-READ-BYTE-SEQUENCE` and call `EXT:READ-CHAR-SEQUENCE`/`EXT:READ-BYTE-SEQUENCE` instead.

  The default method calls `GRAY:STREAM-READ-CHAR-SEQUENCE` or `GRAY:STREAM-READ-BYTE-SEQUENCE`.

`(GRAY:STREAM-WRITE-SEQUENCE `stream` `sequence` `&KEY` `:START` `:END`)`

  Used by `WRITE-SEQUENCE`. Deprecated. Define `GRAY:STREAM-WRITE-CHAR-SEQUENCE` or `GRAY:STREAM-WRITE-BYTE-SEQUENCE` and call `EXT:WRITE-CHAR-SEQUENCE`/`EXT:WRITE-BYTE-SEQUENCE` instead.

  The default method calls `GRAY:STREAM-WRITE-CHAR-SEQUENCE` or `GRAY:STREAM-WRITE-BYTE-SEQUENCE`.

| These notes document CLISP version 2.45 | Last modified: 2008-05-14

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
30.2. Defined classes | Home | 30.4. Generic functions for character input