8
0

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.

Object Pascalを6行でセグフォらせる

Last updated at Posted at 2020-07-03

pythonを三行でセグフォらせる
pythonを2行でセグフォらせる
pythonを1行でセグフォらせる
C言語で16文字でセグフォらせる
Pythonを33文字でセグフォらせる
Rustを5行でセグフォらせる
C 言語で 5 文字でセグフォらせる
6行でJavaをセグフォらせる

を見て、たまたまそこにDelphiがあったので適当に書いたが
Delphi で最少のソースコードを書いてみるを見て反省して書き直し。

Project.dpr
program Project1;
uses Classes, Forms; {$R *.res}
var list: TStringList;
begin Application.Initialize; list.Delete(-1); Application.Run;
end.

これでいいみたい。
image.png

以下初回作

Unit1.pas
procedure TForm1.FormCreate(Sender: TObject);
var
 data:array[0..0] of string; i:integer;
begin
  for i:=0 to 1 do begin showmessage(data[i]); end;
end;

image.png

Delphi 言語 / Object Pascal について

8
0
1

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
8
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?