Created
December 3, 2018 13:50
-
-
Save toshimasa-nanaki/10618ce698bd993e540e7409d0d24dd5 to your computer and use it in GitHub Desktop.
Rust ループ(ラベル)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
//ループラベル | |
'outer: for i in 0..10 { | |
'inner: for j in 1..11 { | |
if i % 2 != 0 { continue 'outer; } | |
if j % 2 == 0 { continue 'inner; } | |
println!("i: {}, j: {}", i, j); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment