[fpc-pascal] allocating memory for records
M.Santhoff at t-online.de
Fri Jul 7 19:40:53 CEST 2006
Am Freitag, den 07.07.2006, 10:09 -0700 schrieb Leonardo M. RamX:
> you don't need to allocate memory for records, you can us as follows:
> MyRec = record
> a: integer; /* very clear */
> b: string; /* not clear, how much bytes are needed? */
> myRecVar: MyRec;
> myRecVar.a := 10;
> myRecVar.b := 'Hello World!';
Yes, I know. But in this case I definitely have to because a static
variable disappears outside a function declaring it, so I need a
solution that is robust and portable.
But thank you anyways, a helping hand is always welcome.
More information about the fpc-pascal