2.3 函数 [root@itoracle src]# cargo new functions Created binary (application) `functions` package [root@itoracle src]# cd functions/ [root@itoracle functions]# vim src/main.rs Rust code uses snake case as the conventional style for function and variab…
fn main() { println!("Hello, world!"); another_function(2,3); let y ={ let x =3; //表达式的结尾没有分号,如果在表达式的结尾加上分号,它就变成了语句,而语句不会返回值. x+1 }; println!(" the value in main of y is {}",y); let x = five(); println!(" the value in main of x is…