Free Pascal accepts this if you change "=" to ":". Fields are declared using ":", types with "="
{$mode Delphi} type menu = class private menu_element : RECORD id: PtrUInt; desc: string; end; public procedure foo(); end; procedure menu.foo; begin end; begin end.
Turbo Pascal and Delphi (and FPC before 2.2) prohibit this. Free Pascal has restored this old behavior (Classic Pascal) due to dialects of Apple.
source share