rust/src/test/run-pass/while-and-do-while.rs

13 lines
238 B
Rust
Raw Normal View History

fn main() {
2011-07-27 07:19:39 -05:00
let x: int = 10;
let y: int = 0;
while y < x { log_full(core::debug, y); #debug("hello"); y = y + 1; }
do {
#debug("goodbye");
x = x - 1;
log_full(core::debug, x);
} while x > 0
}