这个程序能执行就是不显示数字在Lable
unit Unit1;interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
var
num:Arrayof Integer;
i:Integer=1;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption:=label1.Caption+''+Edit1.Text;
num:=StrToInt(Edit1.Text);
i:=i+1;
Edit1.Text:='';
end;
procedure TForm1.Button2Click(Sender: TObject);
var
l,j,k,n:Integer;
begin
For l:=1 to i-1 do
begin
k:=i-l;
For j:=1 to k do
begin
If(num<num)then
begin
n:=num;
num:=num;
num:=n;
end;
end;
end;
label1.Caption:='';
For l:=i-1 Downto 1 do
Label1.Caption:=Label1.Caption+IntToStr(num)+'';
end;
end. 感覺for迴圈沒執行
請問是要執行什麼功能??
可以上傳你的檔案嗎 这是小甲鱼第十九课的例子执行数字大小排序 程序检查是对的 label visible有 true嗎
页:
[1]