[fpc-pascal] Function to create a record ?

Jean SUZINEAU jean.suzineau at wanadoo.fr
Mon Jun 5 12:05:12 CEST 2023

Oops, I hit "Send message" too quickly.

The only difference in the second code is:

- personrecord renamed to personclass and declared as "personclass = class"

- "newp:= personclass.Create;" added in function newperson

Of course for a clean code, you'll need to call something like 
"FreeAndNil( person);" or "person.free" to release properly the memory 

More information about the fpc-pascal mailing list