Jean SUZINEAU via fpc-pascal said on Mon, 5 Jun 2023 11:56:59 +0200
>Hello, I have a hard time trying to understand what you want to test.
>
>In your functions, you are using a record, not a class or a pointer to
>record or an object.
>
>The personrecord just behave in your parameters and return
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(
Hello, I have a hard time trying to understand what you want to test.
In your functions, you are using a record, not a class or a pointer to
record or an object.
The personrecord just behave in your parameters and return value as an
Integer or a String, and your fillchar doesn't write outside