From: ···@accessacg.net
Subject: CormanLisp save-application
Date: 
Message-ID: <ghph5.54027$6y5.36187920@news2.rdc2.tx.home.com>
Could someone post a Hello World example showing how to get  save-application to work in CormanLisp?
Console app is fine, I can not get anything to print, just the "Type :quit to exit"

Thanks.

From: The Glauber
Subject: Re: CormanLisp save-application
Date: 
Message-ID: <8m6nq3$st4$1@nnrp1.deja.com>
In article <························@news2.rdc2.tx.home.com>,
  ···@accessacg.net wrote:
> Could someone post a Hello World example showing how to get  save-
application to work in CormanLisp?
> Console app is fine, I can not get anything to print, just
the "Type :quit to exit"


Look in the examples directory. For example, hellowin.lisp

--
Glauber Ribeiro
··········@my-deja.com    http://www.myvehiclehistoryreport.com
"Opinions stated are my own and not representative of Experian"


Sent via Deja.com http://www.deja.com/
Before you buy.
From: ·····@corman.net
Subject: Re: CormanLisp save-application
Date: 
Message-ID: <8m6rrq$98$1@nnrp1.deja.com>
In article <························@news2.rdc2.tx.home.com>,
  ···@accessacg.net wrote:
> Could someone post a Hello World example showing how to get  save-
application to work in CormanLisp?
> Console app is fine, I can not get anything to print, just
the "Type :quit to exit"

This should do what you want:

(defun hello ()
	(format t "Hello, world.~%")
	(force-output)
	(win:exitprocess 0))
(save-application "hello" #'hello :console t)

The force-output is necessary to get the buffered output to print
prior to the lisp thread quitting. The exitprocess call will cause
the app to shutdown without waiting for the user to type :quit.
This is necessary because the console shell and the lisp thread
are not strictly synchronized; the console does not automatically
quit when the lisp thread quits (it probably should).

You need to use the :console t option in the save-application call
to cause it to be a console app, rather than a windows UI app.

One more thing, if you call save-application a second time, with
the same name, rather than overwrite the existing application it
causes a new lisp app to be appended to the old one. This is a
bug and needs to be fixed. For now, always delete the .exe file
prior to calling save-application a second time.

This was a good question, and I think this should be included as
an example with the release.

Roger Corman


Sent via Deja.com http://www.deja.com/
Before you buy.