Getting command line arguments lazarus / 21-General ---------------------------------------------------------------------- calm_sea · 2022-08-27 14:13 Hello everybody. How can I read the parameters from the command line of the application launch? ---------------------------------------------------------------------- Red_prig · 2022-08-27 14:16 https://www.freepascal.org/docs-html/rtl/system/paramstr.html https://www.freepascal.org/docs-html/rtl/system/paramcount.html ---------------------------------------------------------------------- Kays · 2022-08-27 14:17 Have a look at command-line parameters and environment variables in the Wiki. ---------------------------------------------------------------------- MarkMLl · 2022-08-27 14:30 Quote from: Red_prig on August 27, 2022, 04:16:24 pmhttps://www.freepascal.org/docs-html/rtl/system/paramstr.html https://www.freepascal.org/docs-html/rtl/system/paramcount.html Noting that (a) whether wildcards are expanded and (b) precise disposition of operands containing "funny stuff" such as spaces is OS- dependant. MarkMLl ---------------------------------------------------------------------- KodeZwerg · 2022-08-27 14:33 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program project1; var  i: Integer;begin  if ParamCount > 0 then    for i := 1 to ParamCount do      WriteLn(ParamStr(i));end. ---------------------------------------------------------------------- jollytall · 2022-08-27 14:58 Have a look at this: https://github.com/zsoltszakaly/getoptionsforpascal. This follows all the standards and quasi-standards available, like short and long options, optional and mandatory options and non-option parameters, etc. Unlike many similar ones, you can parameterize it once and later use the parameters in any order once you need them.