- 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
- Vue.js 2 and Bootstrap 4 Web Development
- 趣學Python算法100例
- Learn Programming in Python with Cody Jackson
- Bootstrap 4:Responsive Web Design
- C語言實驗指導及習題解析
- 網絡爬蟲原理與實踐:基于C#語言
- C語言程序設計學習指導與習題解答
- SAP BusinessObjects Dashboards 4.1 Cookbook
- R語言數據可視化:科技圖表繪制
- Java高手是怎樣煉成的:原理、方法與實踐
- 零基礎學編程系列(全5冊)
- Less Web Development Cookbook
- 前端架構設計
- Cinder:Begin Creative Coding
- 思維黑客:讓大腦重裝升級的75個超頻用腦法