Page 1 of 1

Entry point of an executable

Posted: Wed Aug 20, 2008 11:16 pm
by Akira
From what I have read, there is no equivalent to main or WinMain in lisp. So, when I create an executable, a fas file, does the program just start with the first function that it encounters? or is there any way to tell him to start somewhere else? I will suspect that is the former.

And how do I tell the program to finish whenever I want? Calling (quit) or (exit) will be enough? (using CLisp, in case is important).

Regards,
Akira

Re: Entry point of an executable

Posted: Thu Aug 21, 2008 3:47 am
by ramarren
A "fas" file is really called a fasl file, where fasl is a shortened form of "FASt Load". Those files are supposed to be loaded into a Lisp image, containing among other things a runtime. It is possible for it to execute code which actually performs actions, but most often it will only define functions and so on, and the program itself would be launched either interactively from the REPL, from parameters to the image, or by saving an image with an initial function defines. For CLISP see http://clisp.cons.org/impnotes/image.html#init-func , there is a general summary in http://www.cliki.net/Creating%20Executables .

Re: Entry point of an executable

Posted: Thu Aug 21, 2008 5:57 am
by Akira
Ok, thanks :)