how to load script?

Q&A's, tips, howto's
Locked
_ex_
Posts: 23
Joined: Wed Aug 23, 2006 3:17 pm
Location: Peru

how to load script?

Post by _ex_ »

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.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

your myFile.lsp file should look like this:

Code: Select all

(println (+ 3 4))

(exit)
now do:

Code: Select all

newlisp myFile.lsp
or with such short code you could just do:

Code: Select all

newlisp -e '(+ 3 4)'
Lutz

_ex_
Posts: 23
Joined: Wed Aug 23, 2006 3:17 pm
Location: Peru

Post by _ex_ »

Thank you!
now with more interesting questions...
cya :)

Locked