newLISP Fan Club

Forum => newLISP in the real world => Topic started by: _ex_ on August 23, 2006, 08:23:41 AM

Title: how to load script?
Post by: _ex_ on August 23, 2006, 08:23:41 AM
Hi there!

I'm trying to load a lisp file and be interpreted (like perl, ruby etc...)

I'm using the next command:



newlisp myFile.lsp OR (newlisp -c myFile.lsp)



where myFile.lsp is just:

(+ 1 2)



(with the correct paths and current directory)

This only shows the console, not the answer (3)



I don't think the -e flag is going to help me here.
Title:
Post by: Lutz on August 23, 2006, 08:38:25 AM
your myFile.lsp file should look like this:


(println (+ 3 4))

(exit)


now do:


newlisp myFile.lsp


or with such short code you could just do:


newlisp -e '(+ 3 4)'

Lutz
Title:
Post by: _ex_ on August 23, 2006, 08:42:26 AM
Thank you!

now with more interesting questions...

cya :)