swift - Swift 3.0 中的 do-until 循环

标签 swift algorithm loops

Swift 3.0 中是否有条件控制循环,只要条件为假,后测就会执行?如果不是,那么 Swift 3.0 中的 do-until 循环是什么?等效项的性能优势是什么?

最佳答案

使用 repeat-while 循环:

repeat {
} while !condition

关于swift - Swift 3.0 中的 do-until 循环,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39778906/

相关文章:

c - do ... while 循环在 main 中不起作用

ios - deinit 未调用 subview Controller

swift - Google Maps iOS SDK map 不会出现

ios - 从 View Controller 调用 TabBarController 委托(delegate) - Swift

ios - UIButton 上的 UIControl.State.Highlighted 图像仅在第一次触摸事件后有效

python - 从 xgboost 中提取权重和树结构 - plot trees

jQuery 在 div 内一次循环 p 标签的 .fadeIn 和 .fadeOut

javascript - 比较持续时间并返回匹配百分比

algorithm - 为图形着色黑白

c++ - 从堆栈中弹出对象