[fpc-pascal] Function to create a record ?

2023-06-01 Thread Steve Litt via fpc-pascal
Hi all, I'm trying to create a function (called newperson()) that creates a new instance of a record. The following compiles with no errors or warnings in FPC, but multiple calls to newperson() produce exactly the same variable, so in the preceding changing person changes person2, and vice versa:

Re: [fpc-pascal] Function to create a record ?

2023-06-01 Thread Ralf Quint via fpc-pascal
On 6/1/2023 5:36 PM, Steve Litt via fpc-pascal wrote: Hi all, I'm trying to create a function (called newperson()) that creates a new instance of a record. The following compiles with no errors or warnings in FPC, but multiple calls to newperson() produce exactly the same variable, so in the pre