How to add record to Tlist and read record from Tlist lazarus / 61-Beginners ---------------------------------------------------------------------- admfotad · 2015-08-18 11:49 Hi Long time ago i used to code using Delphi. Now i'm trying with Lazarus. How can I add record to a Tlist and read from Tlist record - i can not find out how to do it in Lazarus. Example in Delphi: Code: [Select]type pls=^tls ; tls=record something:string[30]; another:string[30]; password :integer; end; Code: [Select]var   Form1: TForm1;   list :Tlist;   rec: Pls; Code: [Select]procedure no_idea_how_to; var nw:pls; begin //reading from Tlist new(nw); nw:=list.Items[z]; nw.something:='it's a hard life'; // and so on //adding record  to list new(nw); (..) list.add(nw); end; but this code is not working in Lazarus. Any ideas ? Thank you in advance. ---------------------------------------------------------------------- eny · 2015-08-18 12:13 Sure it works. But you have to show the actual code you are using so we can help you out; not snippets that do not compile. One hint to start with: Code: [Select]nw^.something := 'it''s a hard life'; Or you coulde try the Delphi mode flag:Code: [Select]{$MODE DELPHI} ---------------------------------------------------------------------- Thaddy · 2015-08-18 12:22 In Delphi mode that simply works. Free Pascal is not Delphi. If you want it to behave like Delphi you have to tell it so. ---------------------------------------------------------------------- admfotad · 2015-08-18 12:31 Quote from: eny on August 18, 2015, 02:13:57 pmSure it works. But you have to show the actual code you are using so we can help you out; not snippets that do not compile. One hint to start with: Code: [Select]nw^.something := 'it''s a hard life'; Or you coulde try the Delphi mode flag:Code: [Select]{$MODE DELPHI} Thanks for quick answer, it's allready working well with eny's hint Regards