请delphi高手指点!with do命令

来源:百度知道 编辑:UC知道 时间:2024/06/16 00:03:07
请问with do 是什么命令,在什么时候用!
请问for do 是什么命令,在什么时候用!
二都有什么关联!!!
多谢!!!

with do 和for do 没有任何联系
with do 的用法如:
with edit1 do
begin
text :='hello';
caption :='hello';
end;
可以省略edit1

for do是循环用
for i:=0 to 11 do
begin
...
end;

with *** do 是开域语句,是打开某一个设定好的域,例如with table do,with combobox do 等
而for *** do是在知道循环次后 的一种循环语句。