fredvs via fpc-pascal <fpc-pascal@lists.freepascal.org> 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, etc.,
> > whereas your version finishes with a result of 0 even if the processing
> > encountered some errors.
>
> No, I dont think so, all error code are still there.
> Even more, if the user dont use a filename as parameter, help-messages are
> displayed.
>

You are wrong. Halt() sets the error code provided as parameter. Terminate
by itself does not.


> And also I dont see what it could have to do with the memory leak.
>

Terminate leads to the destructor being called while Halt exists the
program in a hard way. But as Tomas wrote, when a program terminates all
memory is returned to the OS so that is not really a problem.

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to