RBE custom types constants

This commit is contained in:
Dan Buch 2021-09-12 10:35:45 -04:00
parent f40981544c
commit 278ec88944
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

View File

@ -0,0 +1,16 @@
static LANGUAGE: &str = "Rust";
const THRESHOLD: i32 = 10;
fn is_big(n: i32) -> bool {
n > THRESHOLD
}
fn main() {
let n = 16;
println!("This is {}", LANGUAGE);
println!("The threshold is {}", THRESHOLD);
println!("{} is {}", n, if is_big(n) { "big" } else { "small" });
// THRESHOLD = 5;
}