xytroxon wrote:Change the link.lsp program so that after the script to be appended is loaded into memory, push a (set 'link.lsp? true) flag to the front of the code string, before the string is written to the .exe file being created.
...
-- xytroxon
Therein lies the difference between the guru and the disciple.
My solution was as below, and happens entirely within the script being developed rather than in link.lsp.
Code: Select all
(define (linked?)
(not (starts-with (lower-case (main-args 0)) "newlisp"))
)
(setq command_line (if (linked?) (main-args) (rest (main-args))))
With this approach I end up with a list, command_line, that works properly no matter what, as below.
Code: Select all
S:\>type linkage.lsp
(define (linked?) (not (starts-with (lower-case (main-args 0)) "newlisp")))
(setq command_line (if (linked?) (main-args) (rest (main-args))))
(println command_line)
(exit)
Code: Select all
S:\>newlisp linkage.lsp "newLISP rules" OK!
("linkage.lsp" "newLISP rules" "OK!")
S:\>linkage.exe "newLISP rules" OK!
("linkage.exe" "newLISP rules" "OK!")
So thanks very much xytroxon, you've been really helpful. Jam your stuff and my stuff together, and we have the solution.
Kind regards,
Bruce.