FillChar call in lazarus / 62-General ---------------------------------------------------------------------- AlexTP · 2023-07-25 06:08 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 function GetProgDir: shortstring;var  s1: shortstring;  alock: BPTR;  counter: Byte;begin  GetProgDir := '';  FillChar(s1, 255, #0);  and 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 function GetProgramName: shortstring;{ Returns ONLY the program name }var  s1: shortstring;  Counter: Byte;begin  GetProgramName := '';  FillChar(s1, 255, #0);  Maybe replace 255->256  to fill the entire shortString var? ---------------------------------------------------------------------- TRon · 2023-07-27 10:16 Thank you very much for noting AlexTP. It is in my todo list. Do note that it has no influence on the outcome for those functions as OS function calls are used that are responsible for returning the correct string contents. ---------------------------------------------------------------------- bytebites · 2023-07-27 12:24 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   s1:=Default(ShortString);