<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I changed line 7:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">TElement = record</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> strr: String;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> end;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> TList = array[0..1] of TElement; //HERE</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> Plist = ^TList; </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">and demo works. Simply, static and dynamic arrays are not the same.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">AFAIR, dynamic array is just pointer while static array are data.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I guess someone else will give you more detailed answer.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Valdas Jankūnas via Lazarus<br />
> Komu: Lazarus@lists.lazarus-ide.org<br />
> Datum: 29.04.2018 18:16<br />
> Předmět: [Lazarus] Runtime error: INCLOCKED<br />
></p>
<br />
type<br />
TElement = record<br />
strr: String;<br />
end;<br />
TList = array of TElement;<br />
Plist = ^TList;<br />
.....<br />
<br />
Why I getting that error? Something wrong with records and constant initialization?<br />
<br />
My system is: Linux 4.13.0-39-generic #44-Ubuntu SMP Thu Apr 5 14:25:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux<br />
FPC (from SVN): 3.1.1 [2018/02/21] for x86_64<br />
-- <br />
Valdas Jankūnas<br />
-- <br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus-ide.org<br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a><br />