[fpc-devel] Type/Record Helper SVN Change (Atn: FPC-Core Members)
Den
cyraid at gmail.com
Mon Feb 17 21:32:33 CET 2014
Hi all to FPC Core,
I was wondering why the change to have a modeswitch for the
Type/Record Helper? In Delphi there is no such switch needed. Doing
something like:
--------------------------------------------------------
program TestHelper;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
type
TStringHelper = record helper for String
function Length: Integer;
end;
var
S: string;
begin
S := 'Test String';
Writeln(S, ', length: ', S.Length);
ReadLn;
end.
--------------------------------------------------------
Should work out of the box (this example was taken straight from a
Developer of XE3 btw).
- Dennis Fehr
More information about the fpc-devel
mailing list