Description
In this course, you will learn :
- Creating a basic HELLO WORLD programme.
- Go over concepts such as variables, loops, conditional statements, and arrays to solidify your foundation.
- Fundamentals, you'll move on to more advanced topics like functions, unit testing, and contract programming.
Syllabus :
1. Getting Started With D
- The Hello World Program
- writeln and write
- Challenge: Fix the Code
- Solution: Fix the Code
- Compilation of D Code
2. Variables and User Input
- Fundamental Types
- Assigning Values to Variables
- auto and typeof
- Challenge: Output Variable Values in a Statement
- Solution: Output Variable Values in a Statement
- Standard Input and Output Streams
- Reading from the Standard Input
3. Arithmetic and Logical Operations on Data Types
- Logical Expressions
- Challenge: Fix the Code
- Solution: Fix the Code
- Integers
- Basic Arithmetic Operations on Integers
- Advanced Arithmetic Operations on Integers
- Challenge: Find Remainder and Quotient of an Integer
- Solution: Find Remainder and Quotient of an Integer
- Detecting Overflow and Truncation in Integers
- Floating Point Types
- Overflow and Truncation in Floating Point Types
- Floating Point Types Usage and Limitations
4. Conditional Statements and Loops
- if Statement
- Chaining if-else Statements
- Challenge: Fix the Code
- Solution: Fix the Code
- Ternary Operator ?:
- Lazy Operators
- while Loop
- Name Scopes
- for Loop
- Challenge: Print a Parallelogram Pattern
- Solution: Print a parallelogram pattern
- do-while Loop
5. Arrays, Characters and Strings
- Arrays
- An Array Example
- Array Initialization and Basic Array Operations
- Associative Arrays
- Challenge: Sort and Reverse Elements of an Array
- Solution: Sort and Reverse Elements of an Array
- Slices and Other Array Features
- Slices: Termination of Sharing
- Operations on All Elements
- Multi-dimensional Arrays
- Challenge: Halve the Elements of the Array
- Solution: Halve the Elements of the Array
- Characters: Introduction
- Characters: Types and Literals
- Characters: The std.uni Module
- Characters: D's Unicode Problems and Support
- Strings
- String Length, Literals and Comparison
6. File Handling in D
- Redirecting the Standard Input and Output Streams
- Files
- std.stdio.File struct
7. Literals and enum
- Integer and Floating Point Literals
- Challenge: Fix the Code
- Solution: Fix the Code
- Character and string Literals
- enum
8. Formatted Output and Input
- Formatted Output
- Format Specifiers: Format_Character
- Format Specifiers: Width, Separator, Precision and Flags
- Format Specifiers: Formatted Element Output
- Format Specifiers: Positional Parameters and Format
- Formatted Input
9. foreach Loop and switch-case Statement
- foreach Loop
- foreach Loop Properties
- Challenge: Swap Keys with Values of an Associative Array
- Solution: Swap Keys with Values of an Associative Array
- switch and case
10. Functions
- Introduction
- How Functions Work?
- Improved Code Quality
11. Immutability
- Immutability
- Immutable Parameters
- Should a Parameter be const or immutable?
- Immutability of the Slice Versus the Elements
12. Value Types and Reference Types
- Value Types
- Reference Variables
- Reference Types
- Value Types vs Reference Types
13. Function Parameters
- Function Parameters
- Referenced Variables As Parameters
- Parameter Qualifiers: in, out, const and immutable
- Parameter Qualifiers: ref, auto ref and inout
- Parameter Qualifiers: lazy, scope and shared
- Function Parameters: Summary
- Challenge: Fix the Code
- Solution: Fix the Code
- Lvalues and Rvalues
14. Program Environment
- The Return Value of main( )
- Parameters of main( )
- Command-Line Options and the std.getopt Module
- Environment Variables and Starting Other Programs
15. Exceptions and scope
- Exceptions
- The throw Statement
- The try-catch Statement to Catch Exceptions
- The finally Block
- Exception Properties
- Kinds of Errors
- scope
16. assert and enforce Statements
- Types of assert
- Properties of assert
- enforce and the Use of assert-enforce
- Challenge: Fix the Code
17. Unit Testing
- Cause and Discovery of the Bugs
- Unit Testing
- Testing for Exceptions
- Test-Driven Development