Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. unit frmInitial_u;
  2.  
  3. interface
  4.  
  5. uses
  6. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7. Dialogs, StdCtrls;
  8.  
  9. type
  10. TfrmInitial = class(TForm)
  11. lblName: TLabel;
  12. edtName: TEdit;
  13. edtOutput: TEdit;
  14. btnCalculate: TButton;
  15. procedure btnCalculateClick(Sender: TObject);
  16. private
  17. { Private declarations }
  18. public
  19. { Public declarations }
  20. end;
  21.  
  22. var
  23. frmInitial: TfrmInitial;
  24.  
  25. implementation
  26.  
  27. {$R *.dfm}
  28.  
  29. procedure TfrmInitial.btnCalculateClick(Sender: TObject);
  30. var
  31. sNaam, sInitial, sVan : string;
  32.  
  33. begin
  34. sNaam := edtName.Text;
  35. sInitial := sNaam[1];
  36. sVan := Copy(sNaam, Pos(' ', sNaam) + 1, Length(sNaam));
  37.  
  38. //showMessage(sInitial + ' ' + sVan);
  39.  
  40. edtOutput.Text := sVan + ' ' + sInitial + '.';
  41. end;
  42.  
  43. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement