Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

restore

restore

type: function (subr)  
location: built-in
source file: xldmem.c  xlimage.c
Common LISP compatible: no
supported on: all machines

SYNTAX

(restore <file> )
        <file>          -       a string or symbol for the name of the file 

DESCRIPTION

The RESTORE function restores the previously saved XLISP workspace (system state) from the specified file. The <file> may be a string or a symbol. If the <file> does not include a '.wks' suffix, it will be extended to be called <file>.wks. If successful, RESTORE will print a message saying

[ returning to the top level ]

and will not return any value. If RESTORE fails, it will return NIL. There can be several saved workspaces. These workspaces can be restored as often as desired.

EXAMPLES

(defun myfoo (fee fi)                   ; create a function
        (+ fee fi))
(setq myvar 5)                          ; set MYVAR to value 5
myvar                                   ; returns 5
(save 'farp)                            ; save workspace in FARP.wks
                                        ;
(setq myvar "garp")                     ; change MYVAR to "garp"
myvar                                   ; returns "garp"
                                        ;
(restore 'farp)                         ; restore workspace
myvar                                   ; returns 5

FILE NAMES: In the PC and DOS world, all file names and extensions ("FOO.BAT") are automatically made uppercase. In using XLISP, this means you don't have to worry about whether the name is "foo.bat", "FOO.BAT" or even "FoO.bAt" - they will all work. However, in other file systems (UNIX in particular), uppercase and lowercase do make a difference. So, in UNIX if you do a (open 'foo-file :direction :output), this will create a file named "FOO-FILE" because XLISP uppercases its symbols. If you do a (open "foo-file" :direction :output), this will create a file named "foo-file" because UNIX doesn't uppercase its file names. Another case is if you do (save 'world), this will create the file "WORLD.wks". So, if you are having trouble with opening and accessing files, check to make sure the file name is in the proper case.


Go to the first, previous, next, last section, table of contents.