bf_rust/examples/hello_world.rs

16 lines
378 B
Rust
Raw Normal View History

2023-08-22 09:28:55 +02:00
use brainrust::*;
fn main() {
let eval = eval(
&(
2023-08-22 09:39:53 +02:00
"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."
2023-08-22 09:28:55 +02:00
)
);
if eval.is_err() {
let err = eval.unwrap_err();
if err == "Stdin closed" {
return
}
eprintln!("Program failed: {}", err);
}
}