- Julia 1.0 Programming Complete Reference Guide
- Ivo Balbaert Adrian Salceanu
- 96字
- 2021-06-24 14:21:46
The continue statement
What should you do when you want to skip one (or more) loop repetitions then, nevertheless, continue with the next loop iteration? For this, you need continue, as in this example:
for n in 1:10 if 3 <= n <= 6 continue # skip current iteration end println(n) end
This prints out, 1 2 7 8 9 10, skipping the numbers three to six, using a chained comparison.
There is no repeat...until or do...while construct in Julia. A do...while loop can be simulated as follows:
while true # code condition || break end
推薦閱讀
- 深度實踐OpenStack:基于Python的OpenStack組件開發
- Python 深度學習
- 算法大爆炸:面試通關步步為營
- Android Application Development Cookbook(Second Edition)
- Unity Shader入門精要
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- C和C++游戲趣味編程
- Creating Mobile Apps with jQuery Mobile(Second Edition)
- Learning jQuery(Fourth Edition)
- Learning YARN
- Learning AWS
- Machine Learning With Go
- C# 7.0本質論
- SQL Server實例教程(2008版)
- 區塊鏈原理、設計與應用