Урок на Делфи 62. Функция copy(string)


задание на delphi. Немного о функции copy

unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Edit2: TEdit;
Button2: TButton;
Edit3: TEdit;
Button3: TButton;
Edit4: TEdit;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit2.Text:=Copy(Edit1.Text,8,Length(Edit1.Text));
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit3.Text:=Copy(Edit1.Text,8,MaxInt);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Edit4.Text:=Copy(Edit1.Text,8,100);
end;
end.



Скачать