- 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
推薦閱讀
- HTML5+CSS3王者歸來
- Building Modern Web Applications Using Angular
- HTML5+CSS3基礎(chǔ)開發(fā)教程(第2版)
- R語言游戲數(shù)據(jù)分析與挖掘
- MATLAB實(shí)用教程
- Linux環(huán)境編程:從應(yīng)用到內(nèi)核
- Java程序設(shè)計(jì)入門
- Go語言精進(jìn)之路:從新手到高手的編程思想、方法和技巧(2)
- Java 從入門到項(xiàng)目實(shí)踐(超值版)
- Tableau Desktop可視化高級應(yīng)用
- Mastering Embedded Linux Programming
- RESTful Web API Design with Node.js
- Perl 6 Deep Dive
- 零基礎(chǔ)學(xué)C++
- Python機(jī)器學(xué)習(xí)(原書第3版)