BUG???

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

BUG???

Post by newdep »

Hi Lutz,

Linux 8.5.10 ->

Seems Newlisp is able to execute without execution?

Can you tell me where it is going wrong? or perhpas is it behaviour?


Save the following into a newlisp script i.e. test.lsp

#!/usr/bin/newlisp
(setq one (sym (main-args 2)))
(save "test" (sym (name one)))


Oke... now on the linux prompt.. do execute this script BUT give as argument
an existing newlisp script! And what you will see is that the exmaple above
will execute the script AND save it...

Seems (save(sym...)) is able to execute?

i.e. ->

$test.lsp myprog.lsp
.. myprog.lsp is now executed..
.. and saved to "test"



Regards, Norman.
-- (define? (Cornflakes))

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

Post by Lutz »

newLISP will load and execute both programs: test.lsp and myprog.lsp

The first pogram test.lsp creates myprog.lsp, but test.lsp is not exiting, for that reason newLISP also tries to load/execute the second arg 'myprog.lsp'

Just put (exit) at the end of test.lsp

Lutz

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Good heavens ;-)

Thanks!
-- (define? (Cornflakes))

Locked