/ Published in: Lisp

Example of serializing a lisp variable.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
;;; Save (defun save-obj (filename obj) (with-open-file (out filename :direction :output :if-exists :supersede) (with-standard-io-syntax (print obj out)))) ;;; Load (defun load-obj (filename obj) (with-open-file (in filename) (with-standard-io-syntax (setf obj (read in)))))
Comments
