From 1a40fb9b41f713701783d6bb7613cb7422e636d4 Mon Sep 17 00:00:00 2001 From: Ki Rill Date: Sun, 15 Dec 2019 16:34:17 +0600 Subject: [PATCH] Update main.d --- lesson#2/main.d | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lesson#2/main.d b/lesson#2/main.d index deedca0..9b5bc2c 100644 --- a/lesson#2/main.d +++ b/lesson#2/main.d @@ -1,18 +1,18 @@ -// This is a comment, it is ignored by the compiler -// It is useful to comment some pieces of your code. -// For example, instead of reading somebody's code, you could read a comment, which explains what that code does +// This is a comment, it is ignored by the compiler +// It is useful to comment some pieces of your code. +// For example, instead of reading somebody's code, you could read a comment, which explains what that code does -// Before we start coding something interesting, we need to include a library for basic functionality. -// A library is a collection of reusable code written by somebody else. -// This way we do not need to write the same code every time. It is written and stored in a library for us to use. -// A library provides some basic functionality such as getting input from user, outputting text to screen, -// reading from files etc. +// Before we start coding something interesting, we need to include a library for basic functionality. +// A library is a collection of reusable code written by somebody else. +// This way we do not need to write the same code every time. It is written and stored in a library for us to use. +// A library provides some basic functionality such as getting input from user, outputting text to screen, +// reading from files etc. -// To include and use a library use keyword 'import [library name]' -import std.stdio; // handles data input and output +// To include and use a library use keyword 'import [library name]' +import std.stdio; // handles data input and output -// Our main function. Whenver you launch your program, it starts executing instructions from the main function. -// A function is a group of statements that performs a certain task. +// Our main function. Whenver you launch your program, it starts executing instructions from the main function. +// A function is a group of statements that performs a certain task. void main() { - writeln("Hello, Dlang!"); // outputs text to terminal/console + writeln("Hello, Dlang!"); // outputs text to terminal/console }