- Learning D
- Michael Parker
- 222字
- 2021-07-30 10:13:53
Chapter 2. Building a Foundation with D Fundamentals
In this chapter and the next, we're going to look at the fundamental building blocks of D programming. There's a lot of information to cover, so our focus in both chapters will primarily be on the syntax, differences from other C-family languages, and how to avoid common beginner mistakes.
If you enter the code snippets into a text editor and try to compile them as you work through this chapter and the rest of the book, please keep the following in mind. Many of the snippets make use of one or more functions from std.stdio
. In order to be successfully compiled, they all require a main
function. However, both declarations are often missing from the snippets listed in the book in the interest of saving space. Use the following as a template to implement any such snippets yourself:
import std.stdio; void main() { // Insert snippet here }
Here's how this chapter is going to play out:
- The very basics: Identifiers, scope, modules, comments, variable declarations, and initialization
- Basic types: Integral and floating-point types, aliases, properties, and operators
- Derived data types: Pointers, arrays, strings, and associative arrays
- Control flow statements: Loops, conditionals, scope, and go to statements
- Type qualifiers: Immutable and const
- Functions: Everything to do with functions
- MovieMan: The first steps
- 深入淺出Prometheus:原理、應用、源碼與拓展詳解
- Mastering Python High Performance
- 重學Java設計模式
- SharePoint Development with the SharePoint Framework
- Swift語言實戰精講
- Keras深度學習實戰
- Python項目實戰從入門到精通
- Statistical Application Development with R and Python(Second Edition)
- Qt5 C++ GUI Programming Cookbook
- 鴻蒙OS應用編程實戰
- 算法超簡單:趣味游戲帶你輕松入門與實踐
- CryENGINE Game Programming with C++,C#,and Lua
- 亮劍Java Web項目開發案例導航
- Hybrid Mobile Development with Ionic
- 物聯網及低功耗藍牙5.x高級開發