暂时不问(50分)

  • 主题发起人 真我的疯采
  • 开始时间

真我的疯采

Unregistered / Unconfirmed
GUEST, unregistred user!
不好意思!!
 
是UDP通讯的吗
 
这是再基础不过了,
for 语句的语法是
for counter := initialValue to finalValuedo
statement

for counter := initialValuedo
wnto finalValuedo
statement
这里
•
counter 是一个有序类型的局部变量(在包含for 语句的块中声明),没有任何限定符;
•
initialValue 和finalValue 是和counter 赋值兼容的表达式;
•
statement 是简单或结构语句,它不改变counter 的值。
for 语句把initialValue 的值赋给counter,然后重复执行statement,在每次循环后增加或减小counter 的
值(for...to 增加counter,而for...downto 减小counter)。当counter 的值和finalValue 相同时,statement
再执行一次然后for 语句终止。换句话说,对于initialValue 到finalValue 之间的每个值,statement 都执
行一次。若initialValue 等于finalValue,statement 实际执行一次;若在for...to 语句中initialValue 比finalValue
大,或在for...downto 语句中initialValue 比finalValue 小,statement 永远不会执行。在for 语句终止后,
counter 值处于未知状态(未定义)。
 
你跟一下汇编就知道了
 
for的时候自动符值了啊,I:=1
 
for I:=1 to ColCount-1do
for J:=1 to Rowcount-1do
begin
K:=K+1;
Cells[I,J]:=IntTostr(K);
I:=1 就是在初始化值。
 
接受答案了.
 
顶部