compound-types/tuple #188
Replies: 54 comments 6 replies
-
第3题为什么12个元素可以打印,13个元素就不能打印,这是哪里规定的 |
Beta Was this translation helpful? Give feedback.
-
变量不可以只定义不绑定值,第五题,元组可以只定义,不绑定值吗? |
Beta Was this translation helpful? Give feedback.
-
2022.11.14 Done. |
Beta Was this translation helpful? Give feedback.
-
done lala~ |
Beta Was this translation helpful? Give feedback.
-
mark finished |
Beta Was this translation helpful? Give feedback.
-
Done, It's Easy |
Beta Was this translation helpful? Give feedback.
-
第五题: fn main() {
let (x, y, z);
// 填空
(y,z,x) = (1, 2, 3);
assert_eq!(x, 3);
assert_eq!(y, 1);
assert_eq!(z, 2);
} 我自己没有按照要求填空也成功,但没明白其中的原因,是第一句的声明已经给元祖中的做变量绑定了吗? fn main() {
let (x, y, z): (i32, i32, i32);
// 填空
let (y,z,x) = (1, 2, 3);
assert_eq!(x, 3);
assert_eq!(y, 1);
assert_eq!(z, 2);
} |
Beta Was this translation helpful? Give feedback.
-
Done >>>>>>>>>>>>>>>>>> |
Beta Was this translation helpful? Give feedback.
-
compound-types/tuple
Learning Rust By Practice, narrowing the gap between beginner and skilled-dev with challenging examples, exercises and projects.
https://zh.practice.rs/compound-types/tuple.html
Beta Was this translation helpful? Give feedback.
All reactions