Warnings & Hints lazarus / 61-Beginners ---------------------------------------------------------------------- graemejc · 2018-07-14 14:20 (* This is trivial code to demonstrate a problem I've run into. When I try to compile this code, I get a warning Hint: Variable 'c' does not seem to be initialised. Which is untrue, it is initialised in the procedure Ask. My question is how do I turn off hints and warnings for that sort of thing. Lazarus gives me several options to deal with this ... Hide message by inserting IDE directive {%H-} Hide message by inserting {$warn 5058 off} to unit "project1.lpr" Hide with project option {-vm5058} I guess I can use the first option but really don't want a whole heap of {%H-} directives spread through my code. And I think to use it effectively,  I'd have to rewrite ask(c); ... as ... {%H-} ask(c); {%H+} I searched all the pdf files that came with the program and I cannot find any reference to 5058 though I can guess what it means. Is there a better way to acknowledge the hint, then turn the hint off. Also searching all the pdf files, I can't find any reference to %H and it's only through experimentation that I've been able to come to the above semi-solution. *) program Project1; Uses         Crt; var         c: char;.         {------------------------------------------------------------- ---------}         procedure Ask(var ch:char);         begin                 ch:=readkey;         end;         {------------------------------------------------------------- ---------} begin         ask(c);         writeln(c);         readkey;. end { Program Project1 } . ---------------------------------------------------------------------- Phil · 2018-07-14 14:27 Quote from: graemejc on July 14, 2018, 04:20:18 pm(* This is trivial code to demonstrate a problem I've run into. When I try to compile this code, I get a warning Hint: Variable 'c' does not seem to be initialised. Which is untrue, it is initialised in the procedure Ask. Change param to out: procedure Ask(out ch:char); Compiler is doing what it should do, which is warn you that you're passing in a variable that you didn't first initialize. ---------------------------------------------------------------------- Thaddy · 2018-07-14 14:32 1: it is not initialized - you are wrong, it is only initialized in the procedure - , but you can declare it initialized: 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 var  c:char = #0;2. you can also do this locally: 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 var {$push}{$warn 5058 off}  c: char;{$pop}Note I would not recommend using IDE macro's for this.Change editor and it doesn't work. I would simply initialize it at declaration. ---------------------------------------------------------------------- graemejc · 2018-07-14 15:21 Thanks to Thaddy and Phil. Excellent solutions both. Much appreciated. Addendum: Phil sorry but that doesn't seem to work at all. Addendum 2: Sometimes it works ... I'm not sure why sometimes it does not appear to work. Does not seem to work when one procedure has a parameter declared as out and it is called by another procedure also declared as an out. I'll have to examine my code a bit more closely. I'll assume at this stage I've made a mistake ... just not sure where.