[fpc-pascal] static record (class?) procedures in records not supported :(, better example

Skybuck Flying skybuck2000 at hotmail.com
Sat Feb 9 21:55:08 CET 2008


Hello,

Delphi allows the following code to be compiled and run:

// *** Begin of Demo ***

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Unit1 in 'Unit1.pas';


type
 TmyRecord = record
  A,B,C,D,E,F : integer;
 end;

 TmyObject = record
  A,B,C,D,E,F : integer;

  class procedure Test; static;
 end;


class procedure TmyObject.Test;
begin
 writeln('hi');
end;

begin
 TmyObject.Test;

 readln;
end.

// *** End of Demo ***

Just one of the new features.

Bye,
  Skybuck.




More information about the fpc-pascal mailing list