Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 9825acea20b8c1730a908ceb6b6baa6d > files > 65

fpc-doc-3.0.4-6.mga7.armv7hl.rpm

{$mode objfpc}
program testur;

uses resolve;

var
  U : TURIParser;

Procedure DumpURI(U : TURIParser);

begin
  With U do
    begin
    Writeln('Protocol :',Protocol);
    Writeln('Username :',Username);
    Writeln('Password :',Password);
    Writeln('Host     :',Host    );
    Writeln('Port     :',Port    );
    Writeln('Path     :',Path    );
    Writeln('Document :',Document);
    Writeln('Params   :',Params  );
    Writeln('Bookmark :',Bookmark);
    Writeln('URI      :',URI);
    end;
end;

begin
  U:=TURIParser.Create(Nil);
  Try
    Writeln('Parsing : http://www.freepascal.org:80/bugs/db.php?ID=20');
    U.ParseURI('http://www.freepascal.org:80/bugs/db.php?ID=20');
    DumpURI(U);
    U.Active:=True;
    Writeln('Setting URI : http://www.lazarus.freepascal.org/main.php');
    U.URI:='http://www.lazarus.freepascal.org/main.php';
    DumpUri(U);
  finally
    U.Free;
  end;
end.