leledumbo schreef:
I need to make a program exited with an exit code other than 0, but without mem leaks. Currently, Halt seems to return control to calling program (or OS) without freeing allocated mem. Exit (called from main program) does freeing, but I can't return any value because main program is considered a procedure. So, what should I do?
Terminate your program normally, but set the exitcode. ExitCode := 12; Vincent _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal