pull/110/head
unknown 3 years ago
parent b5216178fd
commit 4bd54d382a

@ -1,7 +1,7 @@
# Functions # 函数(Functions
Here, you'll learn how to write functions and how Rust's compiler can trace things way back. 在这里,你将学习如何编写函数,以及 Rust 的编译器如何对事物进行追溯way back
## Further information ## 更多信息
- [How Functions Work](https://doc.rust-lang.org/book/ch03-03-how-functions-work.html) - [How Functions Work](https://doc.rust-lang.org/book/ch03-03-how-functions-work.html)

@ -3,6 +3,7 @@
// I AM NOT DONE // I AM NOT DONE
/// 翻译: [mg-chao](https://github.com/mg-chao)
fn main() { fn main() {
let x = 3; let x = 3;
println!("Number {}", x);// 译:"数字 {}" println!("Number {}", x);// 译:"数字 {}"

@ -3,6 +3,7 @@
// I AM NOT DONE // I AM NOT DONE
/// 翻译: [mg-chao](https://github.com/mg-chao)
fn main() { fn main() {
let x: i32; let x: i32;
println!("Number {}", x); println!("Number {}", x);

@ -3,6 +3,7 @@
// I AM NOT DONE // I AM NOT DONE
/// 翻译: [mg-chao](https://github.com/mg-chao)
fn main() { fn main() {
let number = "T-H-R-E-E"; // don't change this line let number = "T-H-R-E-E"; // don't change this line
println!("Spell a Number : {}", number);// 译:"拼接的数字:{}" println!("Spell a Number : {}", number);// 译:"拼接的数字:{}"

@ -3,6 +3,7 @@
// I AM NOT DONE // I AM NOT DONE
/// 翻译: [mg-chao](https://github.com/mg-chao)
const NUMBER = 3; const NUMBER = 3;
fn main() { fn main() {
println!("Number {}", NUMBER); println!("Number {}", NUMBER);

Loading…
Cancel
Save