Description

SAVE-OBJECT is a recursive function which writes an ASCII representation
of a LISP object to a designated file.

kr010622: in other words, it serializes arbitrary LISP data
structures, very similar to what the "pickle" operation does in the
scripting language python.NOTE: SAVE-OBJECT doesnt need a special LOAD function!
You can load files created by SAVE-OBJECT with the
standard LOAD function

Usage

To save:

(SAVE-OBJECT (list 10 20 30) "myfile.lisp") ,

To restore the data in the saved list:

(LOAD "myfile.lisp")

Where the newly restored data ends up:

db:*db-input* == (LIST 10 20 30)

Objects which may be saved include:

symbols, keywords, characters, strings, and pathnames.

numbers, including integer, rational, complex, and floating point.

vectors and multi-dimensional arrays.

objects produced by DEFSTRUCT.

CLOS (PCL) instances, and CLOS(PCL) classes.

hash tables.

compiled functions, represented as (FUNCTION ),
internally.

generic functions, method objects, and class objects.

conses and lists.

circular conses and lists (new)

user defined methods may be defined for arbitrary objects, such
as images.