Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / test / tchlp5.pp
Size: Mime:
{ the size of a class helper is equivalent to that of a pointer }
program tchlp5;

{$ifdef fpc}
  {$mode delphi}
{$endif}
{$apptype console}

type
  TTest = class
    s: String;
    i32: Integer;
    b: Boolean;
    i64: Int64;
  end;

  TTestHelper = class helper for TTest
  end;

var
  res: Integer;
begin
  res := SizeOf(TTestHelper);
  Writeln('SizeOf(TTest): ', SizeOf(TTest));
  Writeln('SizeOf(TTestHelper): ', res);
  if res <> SizeOf(Pointer) then
    Halt(1);
  Writeln('ok');
end.