- 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
- Learning Flask Framework
- 營銷數(shù)據(jù)科學(xué):用R和Python進行預(yù)測分析的建模技術(shù)
- 假如C語言是我發(fā)明的:講給孩子聽的大師編程課
- Hands-On Reinforcement Learning with Python
- 自制編程語言
- R大數(shù)據(jù)分析實用指南
- BeagleBone Black Cookbook
- 學(xué)習(xí)OpenCV 4:基于Python的算法實戰(zhàn)
- C# and .NET Core Test Driven Development
- 快速入門與進階:Creo 4·0全實例精講
- Visual Basic 6.0程序設(shè)計實驗教程
- Unity 2018 Augmented Reality Projects
- CodeIgniter Web Application Blueprints
- Hands-On Robotics Programming with C++
- Java Web開發(fā)教程:基于Struts2+Hibernate+Spring