FPC feature suggestion lazarus / 62-General ---------------------------------------------------------------------- 440bx · 2018-12-25 06:18 hello, FPC is very good about issuing hints mentioning the fact that some variable being used may not have been initialized.  This can be very useful. Unfortunately, at this time, there is no way to tell FPC that either, the variable is already initialized or, that it will be initialized by the procedure/function it is being passed to.  For instance, consider the code snippet below: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 SomeFunc(parm1 : integer; var parm2 : somerecord) : Boolean;begin   RtlZeroMemory(@parm2, sizeof(parm2));  // initialize parm2  { perform binary magic here }  result := everything_is_great;end; .........var  MyParm : somerecord; begin  { use SomeFunc }   r := SomeFunc(v, MyParm);   { compiler issues a hint that MyParm is not initialized }end.  It would be very nice to have something along the lines of 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 {$initializes parm2} that could be placed before SomeFunc's begin statement to inform the compiler that SomeFunc is responsible for initializing parm2.  That way, the compiler would not emit superfluous hints about the variable not being initialized every time SomeFunc is used in the program's body. Thanks for reading. ---------------------------------------------------------------------- bytebites · 2018-12-25 08:15 Does this help? 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 SomeFunc(parm1 : integer; out parm2 : somerecord) : Boolean; ---------------------------------------------------------------------- Thaddy · 2018-12-25 08:39 You can suppress the message with {$push}{$warn xxxx off}.. declaration --- {$pop} xxxx is the number of the warning. Also note rtlxxx fiunctions are platform. Why not 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 parm2 := Default(SomeRecord); ---------------------------------------------------------------------- ASerge · 2018-12-25 10:28 Quote from: bytebites on December 25, 2018, 09:15:36 amCode: 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 SomeFunc(parm1 : integer; out parm2 : somerecord) : Boolean;+1 ---------------------------------------------------------------------- 440bx · 2018-12-25 11:53 Quote from: bytebites on December 25, 2018, 09:15:36 amDoes this help? 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 SomeFunc(parm1 : integer; out parm2 : somerecord) : Boolean;Not only that helps, that is the perfect way of doing it. Thank you, I much appreciate your pointing out the right way of doing it.