[Lazarus] Exit Status of Lazarus App

Sven Barth pascaldragon at googlemail.com
Thu Mar 21 14:41:06 CET 2013


Am 21.03.2013 14:37, schrieb Mark Morgan Lloyd:
> Reinier Olislagers wrote:
>> On 21-3-2013 14:23, David Copeland wrote:
>>> Hi,
>>>
>>> How can I set the exit status/return code of a Lazarus application? I
>>> have done some searching but haven't found it.
>>
>> IIRC, I think it's halt.
>>
>> There might be a fancy lazarus way of doing it (have a look at the
>> application object...)
>
> If halt (with a parameter) is called, are there any bits of normal 
> termination that get skipped? I use it during startup if there's some 
> obvious problem (e.g. a socket can't be created) but I was wondering a 
> few days ago how best to set a result during routine shutdown.
>

"Halt" executes the same termination that happens when you leave the 
main procedure (and it does not matter whether you call "Halt(param)" or 
"Halt", because the latter simply does a "Halt(0)").

Regards,
Sven




More information about the Lazarus mailing list