All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
[delphi语法7]delphi中While语句的使用实例

Writer: aaa Article type: Programming skills(编程技巧) Time: 2014/7/19 0:14:17 Browse times: 460 Comment times: 0

[delphi语法7]delphi中While语句的使用实例


Head photo

Go homepage
Upload pictures
Write articles

[delphi语法7]delphi中While语句的使用实例|方法

While 语句
While 语句和Repeat 语句的不同之处在于While 语句的布尔表达式在循环的开始进行判断。如果表达式的结果为真则执行循环,否则退出循环。结构如下:
while <条件表达式>
begin
<语句>
end;
例如:
I:=0;
while I<5 do
begin
Writeln(IntToStr(I));
Inc(I);
end;
执行以上的例子时会显示0~4 的数字。直到I 不小于5 时才退出循环。





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.