9.21. Swift Continue statement

发布时间 : 2025-10-25 13:33:50 UTC      

Page Views: 9 views

Swift continue statement tells a loop body to stop this loop iteration immediately and restart the next loop iteration.

For for cycle continue the self-adding statement is still executedafter the statement is executed. For while and do...while cycle continue statement to re-execute the conditional judgment statement.

9.21.1. Grammar #

Swift continue the syntax format of the statement is as follows:

continue 

Flow chart:

Image0

9.21.2. Example #

import Cocoa var index = 10 repeat{ index = index + 1 if( index == 15 ){ // Skip when index equals 15 continue } print( "The value of index is \(index)") }while index < 20 

The output of the above program execution is as follows:

The value of index is 11 The value of index is 12 The value of index is 13 The value of index is 14 The value of index is 16 The value of index is 17 The value of index is 18 The value of index is 19 The value of index is 20 
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。