[fpc-pascal] ptop and comma.

Sven Barth pascaldragon at googlemail.com
Mon Feb 24 10:11:22 CET 2020

fredvs via fpc-pascal <fpc-pascal at 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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200224/0bcf7276/attachment.html>

More information about the fpc-pascal mailing list