1. Computing
in TIPS :: Record data types in Delphi represent a mixed set of elements. Each element is called a field; the declaration of a record type specifies a name and type for each field.

Records in Turbo Delphi (Delphi 2006) are even more powerful! How about having a record constructor where you can initialize record field values? How about having properties in records? Cool, ha :)

Read the full article to learn about all the new and cool features of the "new" record structure in BDS 2006.

Related : Understanding Records in Delphi | Variant Records | Storing Record Data in a Database BLOB Field

Comments
November 20, 2006 at 5:49 am
(1) Durmus Celep says:

Hi Zarko, do “instances” of the new record types are created on the heap like a class and get freed by the compiler or they live on the stack in the same manner as a variable? I think the latter should be the case for compatibility but then I wonder where “methods” reside.

Any comments anyone?

November 20, 2006 at 6:02 am
(2) Zarko Gajic says:

Records are allocated on the stack unless they are declared globally or explicitly allocated using the New and Dispose functions.

Methods do not reside in records. They are simply syntactically associated with records.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.