| Allegro CL version 10.0 Moderate update since the initial 10.0 release. 9.0 version |
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.
The fasl file format often changes in new releases and in general, fasl files written by a release will not be readable in a later release. Therefore, all data written to a fasl file should also be available in another readable format (such as a text file). The purpose of the fasl reader/writer is to allow faster data storage and retrieval in a single Allegro CL release on a single platform (fasl files written on one platform also may not be readable on another). Long term data storage should be in a generally readable format.
fasl-read and fasl-write require the compiler so they are not available in application images without the compiler.
See The fasl reader/writer in miscellaneous.htm for more information on fasl-read and fasl-write.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Moderate update since the initial 10.0 release. 9.0 version |