{$mode objfpc}
{$modeswitch typehelpers}  
uses SysUtils;

type
TPetuh = type helper for LongInt
    function AssString(const aFormat: String): String;
end;

function TPetuh.AssString(const aFormat: String): String;
begin  
  Result := Format(aFormat, [Self]);  
end; 

begin
    WriteLn(LongInt(42).AssString('Ответ на главный вопрос: %d.'))
end.