Hey guys,
I have a list I want to either empty or add to depending on whether a checkbox is checked. How do I save so that the list state survives running the script? I can
(save "list.lsp" 'list)
but list.lsp gets rewritten every time I access the page. (I'm mangling newlisp wiki for a specific task)
how do I do that? Thanks!
saving things
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
It seems to work the way you'd expect. Load the list, change it, then save it.
and L is (1 2 3 4 0 1 2 3 4)
Code: Select all
(set 'L '(1 2 3 4))
(save "save.lsp" 'L)
(dotimes (x 5)
(load "save.lsp")
(push x L -1)
(save "save.lsp" 'L))
(println L)