Loads a fasl file created by dump-forms-to-file or with-output-to-fasl-file.
The function
load-data-file
loads a fasl file created by dump-forms-to-file or with-output-to-fasl-file.
load-data-file
has the same semantics as
load
, but treats fasl files differently:
load-data-file
is intended to work with data files generated in a previous version of LispWorks. In particular you can load data files generated by LispWorks 4.3, LispWorks 4.4 and LispWorks 5.0 into LispWorks 5.1.
Fasl files generated by dump-forms-to-file or with-output-to-fasl-file must only be loaded using
load-data-file
.
The pathname specified by
file
must be recognized as a fasl file, otherwise
load-data-file
will load it as a text file. LispWorks recognizes a fasl by its file type matching the value of *binary-file-type* or being in the value of *binary-file-types*.
The default fasl file type in LispWorks 5.0 and later differs to LispWorks 4.x on Windows and Linux, as described in compile-file. Therefore you may need to do something like this to ensure your LispWorks 4.x data file is recognized as a fasl file when loading it in this version of LispWorks:
(let ((sys:*binary-file-types*
(cons "fsl" sys:*binary-file-types*)))
(sys:load-data-file "C:/temp/data.fsl"))
The
fixnum
type in LispWorks 5.0 and later is larger than in LispWorks 4.x on Windows and Linux. A
bignum
dumped in a LispWorks 4.x data file will be loaded as a
fixnum
in LispWorks 5.0 and later if its value is within the
fixnum
range.
LispWorks User Guide and Reference Manual - 21 Dec 2011