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.2.0 / tests / webtbs / tw35533.pp
Size: Mime:
{ %NORUN }

program tw35533;
{$mode delphiunicode}

type
  TPointerHelper = record helper for pointer
    function AsNativeUint: nativeuint;
    function PCharLen: uint32;
  end;

function TPointerHelper.AsNativeUint: nativeuint;
begin
  Result := nativeuint(self);
end;

function TPointerHelper.PCharLen: uint32;
begin
  Result := 5; //- Just here to illustrate the issue.
end;

var
  P: pointer;

begin
  P := @ParamStr(0); //- Just a nonsense pointer.
  Writeln( P.AsNativeUInt );
  Writeln( P.PCharLen );
  Readln;
end.