Constructor

Создает объект класса TLocation.

Синтаксис

PASCAL

constructor TLocation.Create(aURI: String = ''); 

ECMA

TLocation([aURI]);

Параметры

Параметр Тип (PASCAL) Тип (ECMA) По умолчанию Описание
aURI String String '' Строка URI, которую будет представлять созданный объект

Примеры

PASCAL

  1. //{$MODE PASCAL}
    var loc := TLocation.Create;
    loc.Parse('https://www.google.com/search?q=google&oq=goo&sourceid=chrome&ie=UTF-8&gws_rd=ssl#q=waspace');
    Log('Protocol:'#9 + loc.Protocol);
    Log('User:'#9 + loc.User);
    Log('Password:'#9 + loc.Pass);
    Log('Host:'#9 + loc.Host);
    Log('Port:'#9 + loc.Port);
    Log('Path:'#9 + loc.Path);
    Log('Params:'#9 + loc.Params);

  1. //{$MODE PASCAL}
    var loc := TLocation.Create('https://www.google.com/search?q=google&oq=goo&sourceid=chrome&ie=UTF-8&gws_rd=ssl#q=waspace');
    Log('Protocol:'#9 + loc.Protocol);
    Log('User:'#9 + loc.User);
    Log('Password:'#9 + loc.Pass);
    Log('Host:'#9 + loc.Host);
    Log('Port:'#9 + loc.Port);
    Log('Path:'#9 + loc.Path);
    Log('Params:'#9 + loc.Params);

ECMA

  1. //{$MODE ECMA}
    var loc = new TLocation();
    loc.parse('https://www.google.com/search?q=google&oq=goo&sourceid=chrome&ie=UTF-8&gws_rd=ssl#q=waspace');
    log('Protocol:' + String.fromCharCode(9) + loc.protocol);
    log('User:'+ String.fromCharCode(9) + loc.user);
    log('Password:'+ String.fromCharCode(9) + loc.pass);
    log('Host:'+ String.fromCharCode(9) + loc.host);
    log('Port:'+ String.fromCharCode(9) + loc.port);
    log('Path:'+ String.fromCharCode(9) + loc.path);
    log('Params:'+ String.fromCharCode(9) + loc.params);

  1. //{$MODE ECMA}
    var loc = new TLocation('https://www.google.com/search?q=google&oq=goo&sourceid=chrome&ie=UTF-8&gws_rd=ssl#q=waspace');
    log('Protocol:' + String.fromCharCode(9) + loc.protocol);
    log('User:' + String.fromCharCode(9) + loc.user);
    log('Password:' + String.fromCharCode(9) + loc.pass);
    log('Host:' + String.fromCharCode(9) + loc.host);
    log('Port:' + String.fromCharCode(9) + loc.port);
    log('Path:' + String.fromCharCode(9) + loc.path);
    log('Params:' + String.fromCharCode(9) + loc.params);