Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit frmInitial_u;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TfrmInitial = class(TForm)
- lblName: TLabel;
- edtName: TEdit;
- edtOutput: TEdit;
- btnCalculate: TButton;
- procedure btnCalculateClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- frmInitial: TfrmInitial;
- implementation
- {$R *.dfm}
- procedure TfrmInitial.btnCalculateClick(Sender: TObject);
- var
- sNaam, sInitial, sVan : string;
- begin
- sNaam := edtName.Text;
- sInitial := sNaam[1];
- sVan := Copy(sNaam, Pos(' ', sNaam) + 1, Length(sNaam));
- //showMessage(sInitial + ' ' + sVan);
- edtOutput.Text := sVan + ' ' + sInitial + '.';
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement