Functions
fn main() {
println!("Hello, world!");
another_function();
}
fn another_function() {
println!("Another function.");
}Hello world!
Another function.fn main() {
another_function(5);
}
fn another_function(x: i32) {
println!("The value of x is: {}", x);
}Last updated