Simple database: Difference between revisions

m
→‎{{header|Common Lisp}}: ooops, copy-paste error
(→‎{{header|Common Lisp}}: add a backup feature and write symbols in lowercase)
m (→‎{{header|Common Lisp}}: ooops, copy-paste error)
Line 94:
(parse-date (prompt-read "Date watched"))))
 
(defun save-db (filename database)
(let ((file (probe-file filename)))
(rename-filelet ((file (concatenate 'string (probe-file-namestring filefilename) ",1"))
(rename-file file (concatenate 'string (file-namestring file) ",1"))
(with-open-file (out file
:direction :output
:if-existsdirection :supersede)output
:directionif-exists :outputsupersede)
(with-standard-io-syntax
(let ((*printwith-case* :downcase))standard-io-syntax
(pprintlet database((*print-case* out)))):downcase))
(pprint database out))))))
 
(defun watch-save ()
Anonymous user