- Rust Programming By Example
- Guillaume Gomez Antoni Boucher
- 109字
- 2021-07-02 19:12:55
Main function
Let's look again at our first project source code:
fn main() { println!("Hello, world!"); }
It only contains a main function—this is where the execution of the program begins. It is a function that takes no arguments (hence the empty parentheses) and returns a unit, also written (). The body of the function, between curly brackets, contains a call to the println!() macro—we can see this is a macro because it ends with !, as opposed to a function. This macro prints the text between parentheses, followed by a new line. We'll see what is a macro in the Macros section.
推薦閱讀
- 圖書館發展中的知識產權問題研究
- 面向青少年的博物館教育(上下卷)
- 公共文化館治理研究(2015年):四川省文化館“十三五”規劃重大課題調研成果集
- 書事:近現代版本雜談
- 單讀. 十周年特輯(時間的移民+在世界的門外)共2冊
- Hands-On Concurrency with Rust
- 中國人民大學“復印報刊資料”轉載指數排名研究報告(2014)
- 現代圖書館全面質量管理與創新服務研究
- 醫藥信息處理與分析
- 美華書館:檔案如是說(新聞出版博物館文庫·研究)
- 圖書情報專業碩士培養研究與實踐
- 中國古典文獻學(東北師范大學文學院學術史文庫)
- 圖書館合理分享著作權利益訴求研究
- 國際集郵聯合會(FIP)集郵展覽評審規則
- 高校圖書館工具書管理與服務研究