2
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

Organization

Delphiで湯婆婆する

元ネタ: Javaで湯婆婆を実装してみる

Delphi婆婆

image.png

中身

yubaba.pas
procedure TForm1.Button1Click(Sender: TObject);
var
  len, pos :Integer;
  str, org :WideString;
begin
  org := Edit1.Text;
  len := Length(org);

  if MessageDlg('ふん。' + org +'というのかい。', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
  begin
    pos := random(len);
    str := Copy(org, pos, 1);
    MessageDlg('贅沢な名だね。今日からお前の名前は ' + str +' だよ。', mtWarning, [mbYes], 0)
  end;

end;

image.png

はしょり気味婆婆。

参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
2
Help us understand the problem. What are the problem?