Автор Elen задал вопрос в разделе Компьютеры, Связь
Вывод массива в Делфи и получил лучший ответ
Ответ от Ёергей Фетисов[гуру]
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids;type TForm1 = class(TForm) StringGrid1: TStringGrid; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;const ARRAY_SIZE = 10;var Form1: TForm1; Data: array[0..ARRAY_SIZE-1] of Integer;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);var I: Integer;begin Randomize; StringGrid1.FixedCols:=0; StringGrid1.RowCount:=2; StringGrid1.ColCount:=ARRAY_SIZE; for I:=0 to ARRAY_SIZE-1 do begin Data:=Random(1000); StringGrid1.Cells[I, 0]:='cell '+IntToStr(I); StringGrid1.Cells[I, 1]:=IntToStr(Data); end;end;end.
interfaceconst RAZMER_MASSIVA=10varMASSIV: array [1..RAZMER_MASSIVA] of Integer;implementationprocedure FillMassiv;var i: byte;beginfor i:=1 to RAZMER_MASSIVA do MASSIV[ \i ]:= Random(100);end;end;pr
neznayu