fasl-write

Function

Package: excl

Arguments: data stream &optional *fasl-circle* *compile-verbose*

fasl-write writes coded data that can be loaded later to recreate a Lisp data value. The function's return value is unspecified. The coded data written to the file is independent of the value of *package* when fasl-write is called. The compiler must be in the image executing the fasl-write. A file written by fasl-write can be read by fasl-read.

The data argument specifies the data item to be written. It can be any Lisp value built from the following data types: cons cells, hashtables, symbols, numbers (integers, floats, ratios, complexes), characters, strings, structures, vectors and arrays (simple or non-simple, general or specialized), and functions.

The data cannot at this time include CLOS objects, streams, stacks, or c-allocated data (cstructs).

The value of the stream argument must be a string naming the file to be written or an open output stream with element-type (unsigned-byte 8) or one opened by fasl-open. If a string is supplied then a file with this name will be opened, with option :if-exists:supersede. If a stream is supplied, then fasl-write will put the coded form of the data argument in the stream without performing open or close operations. This allows writing several data values to a file so that all can be read later.

The fasl-circle argument specifies whether shared or circular structures should be handled. If this argument is passed and is nil, then fasl-write will perform no checking for circular or shared structure. If it is passed and is true, then checking will be done. If it is omitted, then the value of comp::*fasl-circle* determines whether checking is to be done, a true value of comp::*fasl-circle* forcing the check for shared/circular structure. Note that eq-ness of uninterned symbols within the data object is maintained even if the fasl-circle argument does not cause general checking for sharing. When the data object is subsequently read in, new instances of the uninterned symbols will be created, but only one new uninterned symbol will be created for each distinct uninterned symbol in the data.

Note that structure sharing cannot be maintained across separate calls to fasl-write.

See The fasl reader/writer in miscellaneous.htm for more information on fasl-read and fasl-write.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.