while语句定义了一个语句集合,如果在WHILE循环开始时某个条件的求值结果为false,那么就将执行这个语句集合。
The WHILE statement defines a set of statements to be executed until a condition that is evaluated at the beginning of the WHILE loop is false.
REPEAT 语句定义了一个语句集合,如果在 REPEAT 循环结束时某个条件的求值结果为 true,那么就将执行这个语句集合。
The REPEAT statement defines a set of statements to be executed until a condition that is evaluated at the end of the REPEAT loop is true.
虽然语句的缩进会让代码结构看着比较清晰明显,但嵌套的条件语句读起来还是有点难度。所以建议你如果可以的话,尽量避免使用嵌套的条件判断。
Although the indentation of the statements makes the structure apparent, nested conditionals become difficult to read very quickly. It is a good idea to avoid them when you can.
应用推荐