Inline functions out variable of string bug lazarus / 62-General ---------------------------------------------------------------------- Warfley · 2020-08-01 16:34 I've found a pretty weird bug when using inline functions: 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; {$mode objfpc}{$H+} procedure foo(out c: char); inline;begin  c := #32;end; var s: String; begin  s:=#42;  foo(s[1]);  Writeln(ord(s[1]));end. The contents of s does not change (i.e. the output is 42). When removing the "inline" it works Is this already known or shall I file a bug report? Also would be nice if someone could reproduce this bug ---------------------------------------------------------------------- PascalDragon · 2020-08-01 17:09 I can reproduce it. Please report. ---------------------------------------------------------------------- Warfley · 2020-08-01 17:47 ok, reported ---------------------------------------------------------------------- jamie · 2020-08-01 19:32 I gave you a thank you btw.. I think it may have pointed me in a direction of a failing set of DLLS I attempted to compile with 3.2.0 that didn't error out at compile or runtime but just returned bad data and I do use code like that! inlines with OUTS in an attempt to compress the baggage due to the nature of the operations..  I ---------------------------------------------------------------------- jamie · 2020-08-02 13:46 I found two places in the DLL's files where I use string operations like that, removed the INLINE and those sections of code now works but I still have corrupted data in other parts of the files and doing that same type of code with dynamic arrays of byte seems to work ok using the inline so I am still on a search for the remaining errors.  To recap on the case, these files work perfectly with 3.0.4. I switched to using inline coding because my older Delphi compiler didn't have that so when I switched to fpc I had to do some coding in an attempt to speed up the execution time because that was one of the items I noticed was slower than Delphi's code.. I used the Delphi DLL's for a while with Lazarus then fully compiled over to fpc because I wanted to keep is fully fpc code compliant .