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

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
主站蜘蛛池模板: 凉山| 北宁市| 平阴县| 霍邱县| 息烽县| 平舆县| 叙永县| 呼伦贝尔市| 色达县| 从化市| 岳阳县| 兰溪市| 平舆县| 秀山| 三穗县| 韶关市| 夹江县| 大足县| 临沂市| 东莞市| 泌阳县| 岳普湖县| 塘沽区| 漾濞| 河南省| 万源市| 纳雍县| 安宁市| 阜城县| 高台县| 揭阳市| 龙泉市| 句容市| 抚州市| 石景山区| 阿坝县| 洪雅县| 健康| 佛教| 曲麻莱县| 自治县|