How to return my own code of exit of running program, like a ErrorLevel? lazarus / 61-Beginners ---------------------------------------------------------------------- blackspaceghost · 2021-08-11 13:52 Hello, i try to find something about topic and cant, is it possible to return code of end of programm? Need number type, like in Halt, but it kills all. It doesnt fit, and, for instance, in Exception.Create('1'); returns string data, it doesnt fit too. May be some internal functions or variables? ---------------------------------------------------------------------- lucamar · 2021-08-11 14:19 If you mean for a console application (I'm not sure if it'll work for GUI), just set ExitCode to whatever value you want. ---------------------------------------------------------------------- blackspaceghost · 2021-08-11 14:20 Quote from: lucamar on August 11, 2021, 04:19:08 pmIf you mean for a console application (I'm not sure if it'll work for GUI), just set ExitCode to whatever value you want. yep, i mean console apps. Is it true, that the ExitCode will dont show me it in console, but OS will acquire this value? ---------------------------------------------------------------------- lucamar · 2021-08-11 14:25 Yes, of course; that's the intention. If you have ever used DOS, for example, that's the code you test in a batch file by using: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if ERROLEVEL = 123 ... ---------------------------------------------------------------------- blackspaceghost · 2021-08-11 14:28 Quote from: lucamar on August 11, 2021, 04:25:25 pmYes, of course; that's the intention. If you have ever used DOS, for example, that's the code you test in a batch file by using: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if ERROLEVEL = 123 ... ok, thank you very much!