3.2.3 repeat 语句

Keywords: R

Next: ,Previous: Looping,Up: Control structures

3.2.3 repeat 语句

repeat 语句会重复对主体部分求值直到明确地要求退出。这就意味着你必须小心使用 repeat,因为可能导致死循环。repeat 循环的语法如下

     repeat statement

在使用 repeat 语句时,statement 必须是一个句块。另外,你需要执行一些计算并且测试语句是否会从循环里面跳出。这样做通常需要两条语句。

Hits:Loading...

special topic