FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

make-function-input-stream

Arguments: function &rest args

make-function-input-stream creates and returns an input stream that is populated by function. function is invoked in a new Lisp process with one or more arguments (function will be passed the same number of arguments as make-function-input-stream was passed). The first argument is an output stream to which function should write. The data written by function will be available for reading on the input stream which make-function-input-stream returns. The remaining arguments passed to function are the remaining arguments that were passed to make-function-input-stream. When function terminates (either normally or abnormally), the output stream is closed.

See also with-function-input-stream.

Example

(defun filler (writeto count)
  (dotimes (n count)
     (write-byte n writeto))
  (close writeto))

(setf instream (make-function-input-stream #'filler 5))

(read-byte instream)
RETURNS 0
(read-byte instream)
RETURNS 1

Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version