About the FPC feature lazarus / 64-FPC development ---------------------------------------------------------------------- nouzi · 2019-04-14 08:15 About the FPC feature You could see this expression 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 try    try    finally    end; Exceptend;  In one expression 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 try  finally  Exceptend;  or 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 [code=pascal]try Except finallyend;  [/code] Translate by Google ---------------------------------------------------------------------- Thaddy · 2019-04-14 08:24 Quote from: nouzi on April 14, 2019, 10:15:04 amAbout the FPC feature Try finally end; is used to make sure a reference counted or dynamically allocated resource is always released, e.g: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 a:Tobject;begin  a:=Tobject.create;  try     // do something with a.  finally    a.free; Now after use clean up the instance  end;Try except end; is to catch any exceptions that can be caused in the try block and handle those gracefully, e.g.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 a,b:integer;begin   try      a:=1;      b:=0;      a :=a div b;   except       writeln('division by zero');   end;Your last example is nonsense and should be: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 try  try  except  end;finallyend; ---------------------------------------------------------------------- nouzi · 2019-04-14 08:47 What if I merging the first and second expressions? According to my understanding we get 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 a,b:integer; c:Tobject;  begin    c:=Tobject.create;     try       // do something with a.    finally      c.free; //Now after use clean up the instance    end;       try         a:=1;        b:=0;        a :=a div b;     except         writeln('division by zero');     end;   or this code 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  try          try             // do something with a.          finally          c.free; //Now after use clean up the instance          end;         a:=1;        b:=0;        a :=a div b;     except         writeln('division by zero');     end;             What the inhibitor would be like this 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    c:=Tobject.create;     try         //   try     remove this line           // do something with a.          finally            c.free; //Now after use clean up the instance       //   end;  remove this line           a:=1;        b:=0;        a :=a div b;     except       writeln('division by zero');     end;  Translate from Google ---------------------------------------------------------------------- Thaddy · 2019-04-14 09:00 No. try's are separate blocks and need their own try and end. Look at my examples. You can not short-cut by leaving either a try or an end out! My examples are correct. ---------------------------------------------------------------------- nouzi · 2019-04-14 09:11 @Thaddy thank It was just a suggestion ---------------------------------------------------------------------- Thaddy · 2019-04-14 09:21 The reason is they are syntactically different things.