Load equalvalent?

Started by newdep, March 03, 2004, 11:12:31 AM

Previous topic - Next topic

newdep

Hello Lutz,



Is there an equalvalent of 'load inside newlisp that does 'load the script,

evaluates it, but does NOT run the script ?



So it will load the script into a list (evaluated and sorted) so this list can

then be used (de-listed and executed by i.e. the script that loaded it).



Currently i can only think of using 'read-file for this and then rebuilding it

into a list...but then it still suffers from "rn" and is not evaluated into (fn) or

(lambda) functions...



Norman.
-- (define? (Cornflakes))

Lutz

#1
you could put this in a file:



;; file: myprog.lsp ;;;;;;;;;;;;;;



(set 'myprog '(print "hello world"))



;; eof ;;





Now do a:



(load "myprog.lsp")



myprog => (print "hello world")



(eval myprog) => "hello world" ; return value

hello world                              ; output from running myprog



Lutz