rust/src/test/run-pass/while.rs
2012-05-10 15:27:42 -07:00

13 lines
221 B
Rust

fn main() {
let mut x: int = 10;
let mut y: int = 0;
while y < x { log(debug, y); #debug("hello"); y = y + 1; }
while x > 0 {
#debug("goodbye");
x = x - 1;
log(debug, x);
}
}