Entry point of an executable

Discussion of Common Lisp
Post Reply
Akira
Posts: 5
Joined: Wed Aug 20, 2008 5:21 am

Entry point of an executable

Post by Akira » Wed Aug 20, 2008 11:16 pm

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

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: Entry point of an executable

Post by ramarren » Thu Aug 21, 2008 3:47 am

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 .

Akira
Posts: 5
Joined: Wed Aug 20, 2008 5:21 am

Re: Entry point of an executable

Post by Akira » Thu Aug 21, 2008 5:57 am

Ok, thanks :)

Post Reply