12
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

元ネタ: 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

はしょり気味婆婆。

参考

12
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?