[fpc-pascal] Procedures in records not supported :(

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


Hello,

Borland pulled a fast one on me ;)

My most recent code uses the new feature "procedures in records".

It seems fpc 2.2.0 does not support procedures in records.

I was hoping fpc 2.2.0 could replace Delphi 2007 compiler because Delphi 
2007 compiler is malfunctioning...

I really like this new feature and I simply must must must must must have it 
! ;)

// *** Begin of Code ***

unit tweedelul;

interface

type
 Tstinky = record
  a : integer;

  procedure Here;
 end;

implementation

procedure Tstinky.Here;
begin
 a := 5;
end;

end.

// *** End of Code ***

// *** Begin of Output ***

fpc tweedelul.pas -Mdelphi
Free Pascal Compiler version 2.2.0 [2007/09/09] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win32 for i386
Compiling tweedelul.pas
tweedelul.pas(9,3) Fatal: Syntax error, "END" expected but "PROCEDURE" found
Fatal: Compilation aborted
Error: C:\Tools\Compilers\Free Pascal\2.2.0 Stable for 
Win32\bin\i386-Win32\ppc3
86.exe returned an error exitcode (normal if you did not specify a source 
file t
o be compiled)

// *** End of Output ***

Bye,
  Skybuck. 




More information about the fpc-pascal mailing list