我在做中英文单词对照查询时,有几行代码看不懂.请教高手解释下
代码如下
procedure TForm1.listBox1Click(Sender;TObject);//单击中文单词列表框
Var
i:integer;
begin
fori:=0 to ListBox1.Items.Count-1 do
ComboBox1.ItemIndex:=ListBox1.ItemIndex;
end;
其中第一句我知道怎么回事
从var下就不懂了~
偶是才学.请高手解释下.谢谢
代码如下
procedure TForm1.listBox1Click(Sender;TObject);//单击中文单词列表框
Var
i:integer;
begin
fori:=0 to ListBox1.Items.Count-1 do
ComboBox1.ItemIndex:=ListBox1.ItemIndex;
end;
其中第一句我知道怎么回事
从var下就不懂了~
偶是才学.请高手解释下.谢谢
i:integer; 定义变量i(整型)
begin 开始
fori:=0 to ListBox1.Items.Count-1 do 循环 listbox1中从第一行到最后一行
ComboBox1.ItemIndex:=ListBox1.ItemIndex; combobox1 中显示 listbox1中的当前行信息
end; 结束
ComboBox1.ItemIndex:=ListBox1.ItemIndex;