Basic Pascal Tutorial/Chapter 3/REPEAT..UNTIL/zh CN
Sent here from REPEAT..UNTIL/zh CN.
English · Français · Български · 中文(中国) · 日本語
REPEAT..UNTIL循环 (原作者: Tao Yue, 状态: 未更改)
先循环后判断:
repeat
??????1;
??????
until ???????????????;在repeat循环中,复合语句是内置的,因此,你不需要使用begin-end。另外,直至表达式值为真退出循环。
REPEAT循环被称之为先循环后判断,任何情况下,循环至少执行一次。
var
sum,count : integer;
begin
sum := 0;
count := 0;
repeat
count := count + 1;
sum := sum + count
until (count >= 100);
writeln('sum=', sum);
end.| 上一页 | 目录 | 下一页 |
From the Free Pascal wiki, page "Basic Pascal Tutorial/Chapter 3/REPEAT..UNTIL/zh CN", as it stood on 2022-08-20 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Edited on wiki.freepascal.org by 5 people, 2013–2022
From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.
| When | Who | What changed |
|---|---|---|
| Wangyouworld | Created page | |
| Swen | (minor) | |
| Wangyouworld | (minor) | |
| FTurtle | ||
| Trev | Fixed syntax highlighting; removed categories included in template (minor) | |
| Kai Burghardt | Kai Burghardt moved page REPEAT..UNTIL/zh CN to Basic Pascal Tutorial/Chapter 3/REPEAT..UNTIL/zh CN: tidy up main name space: create subpage hierarchy for basic Pascal tutorial [cf. [[Special: Perm... (minor) | |
| Kai Burghardt | bypass redirects [cf. discussion] | |
| Kai Burghardt | bypass [previously missed] redirect [cf. discussion] | |
| Kai Burghardt | bypass language bar/categorization template redirect [cf. discussion] (minor) |
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
