官术网_书友最值得收藏!

Basics of the Rust Language

Okay, we're ready to actually begin writing some Rust code. In this chapter, we're going to look at how Rust programs are structured, and how an assortment of common programming elements are expressed in the language. We'll start with functions and modules, then move on to fundamental language features, such as branching, looping, and data structures. Almost everything we're covering in this chapter has an equivalent in most other programming languages; these are the fundamentals of programming.

Specifically, this chapter describes the following:

  • Functions, which are somewhat like miniature programs that are part of the larger program
  • Modules, which are used to organize the program
  • Expressions, which are how we tell the program to actually do specific things
  • Branching, which is how we tell the program to make a decision
  • Looping, which is how we tell the program to perform extended actions
  • Structures, which is how we organize information for the program to process
  • Attaching functions to structures or other data types, to make them more useful
主站蜘蛛池模板: 江源县| 托里县| 正定县| 铜山县| 十堰市| 闵行区| 梁河县| 汨罗市| 昌江| 敦化市| 乐安县| 龙里县| 平湖市| 逊克县| 大同市| 凤山市| 读书| 襄汾县| 高阳县| 冕宁县| 增城市| 双牌县| 和平区| 宜州市| 林芝县| 遂昌县| 彩票| 内乡县| 鹿泉市| 合川市| 定陶县| 南召县| 临安市| 康平县| 冀州市| 新民市| 平顶山市| 桑日县| 会泽县| 白朗县| 南康市|