Hello Bart.
OK, I did try your idea, changing the original code with this (see 2 last
lines):
procedure TPToP.Usage(ECode: word);
begin
writeLn('ptop : Usage : ');
writeLn('ptop [-v] [-i indent] [-b bufsize ][-c optsfile][-l linesize]
infile outfile');
writeLn(' converts infile to outfi
>If you really dislike the memory leak (since it's not "nice
>programming"), maybe you can set ExitCode before calling terminate?
>(Untested idea (TM))
Hello Bart.
Thanks for that constructive and respectful answer that gives solution.
Indeed, I **really** dont like programs that generate memory
On Mon, Feb 24, 2020 at 10:11 AM Sven Barth via fpc-pascal
wrote:
> You are wrong. Halt() sets the error code provided as parameter. Terminate by
> itself does not.
> Terminate leads to the destructor being called while Halt exists the program
> in a hard way. But as Tomas wrote, when a program
fredvs via fpc-pascal schrieb am Mo., 24.
Feb. 2020, 02:10:
> Tomas Hajny-2 wrote
> > The difference between your version and the original one is that the
> > original finishes the program with some error code thus allowing some
> > error checking in case the program was called from some script,