Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
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 th

Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Hello Tomas and thanks for the infos. Hum, ok, so I give you the hand to find why the original code finishes the program with some memory leak. Fre;D - Many thanks ;-) -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pasc

Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread Tomas Hajny
On 2020-02-23 15:26, fredvs via fpc-pascal wrote: Hi, OK, I opted for changing in procedure Tjtop.Usage(ECode: word); halt(Ecode); //--> This produces a memory leak with terminate; // --> No nore memory leak. This makes no sense from my point of view. Halt finishes execution of

Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Hello. OK, I opted for changing in procedure Tjtop.Usage(ECode: word); halt(Ecode); //--> This produces a memory leak with terminate; // --> No nore memory leak. There is a Github site forked from original ptop. It include ptop with extended comma feature. Also was added jtop, a

Re: [fpc-pascal] ptop and comma.

2020-02-23 Thread fredvs via fpc-pascal
Hello everybody and especially Michael. OK, I did find the very well hidden memory leak. In ptop.pp it comes from Procedure TPToP.DoRun, line 140 ---> Usage(1); And in the procedure Usage(), the last line produces the memory leak. Procedure TPToP.Usage(ECode : Word); begin Writeln ('ptop : U