When were extended records introduced?
Asked Answered
H

2

4

In Delphi 7, you a record was nothing more than a collection of data grouped into one location. In the last few versions, you've been able to add public and private members, methods, properties and constructors to them, treating them a lot more like objects. What version was this extended syntax introduced in?

EDIT: In case anyone wonders why I'm asking, I'm trying to set up something that would be simplified quite a bit by using the extended syntax, but I want to make it backwards-compatible with older versions of Delphi, so I need to know which IFDEFs to use.

Hanoverian answered 6/5, 2009 at 15:24 Comment(0)
V
9

I'm pretty sure records with methods were introduced in Delphi 2006.

Van answered 6/5, 2009 at 15:32 Comment(0)
L
6

I suggest you to take a look at JCL library. It contains a very useful jedi.inc file, where you can find all kind of definitions for features, specifically there is:

  SUPPORTS_ENHANCED_RECORDS      Compiler supports class [operator|function|procedure] for record types (D9.NET, D10+)

So, records with methods were introduced in Delphi 2005 (.NET) and Delphi 2006 (Win32)

Loincloth answered 6/5, 2009 at 16:29 Comment(1)
Cool! I've got the JCL, but I didn't know that was in Jedi.inc. Thanks!Hanoverian

© 2022 - 2024 — McMap. All rights reserved.