Author: admin
-
Loops
At times, certain instructions require repeated execution. Loops are an ideal way to do the same. A loop represents a set of instructions that must be repeated. In a loop’s context, a repetition is termed as an iteration. The following figure illustrates the classification of loops − Let’s start the discussion with Definite Loops. A loop…
-
Operators
An expression is a special kind of statement that evaluates to a value. Every expression is composed of − Consider the following expression – “2 + 3”. In this expression, 2 and 3 are operands and the symbol “+” (plus) is the operator. In this chapter, we will discuss the operators that are available in Dart. Arithmetic Operators…
-
Operators
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. There are a LOT of operators provided by elixir. They are divided in the following categories − Arithmetic Operators The following table shows all the arithmetic operators supported by Elixir language. Assume variable A holds 10 and variable B holds 20, then −…
-
Variables
A variable provides us with named storage that our programs can manipulate. Each variable in Elixir has a specific type, which determines the size and layout of the variable’s memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. Types of…
-
Variables
A variable is “a named space in the memory” that stores values. In other words, it acts a container for values in a program. Variable names are called identifiers. Following are the naming rules for an identifier − Type Syntax A variable must be declared before it is used. Dart uses the var keyword to…
-
Data Types
For using any language, you need to understand the basic data types the language supports. In this chapter, we will discuss 7 basic data types supported by the elixir language: integers, floats, Booleans, atoms, strings, lists and tuples. Numerical Types Elixir, like any other programming language, supports both integers and floats. If you open your…
-
Data Types
One of the most fundamental characteristics of a programming language is the set of data types it supports. These are the type of values that can be represented and manipulated in a programming language. The Dart language supports the following types− Numbers Numbers in Dart are used to represent numeric literals. The Number Dart come…
-
Basic Syntax
We will start with the customary ‘Hello World’ program. To start the Elixir interactive shell, enter the following command. After the shell starts, use the IO.puts function to “put” the string on the console output. Enter the following in your Elixir shell − In this tutorial, we will use the Elixir script mode where we will keep…
-
Syntax
Syntax defines a set of rules for writing programs. Every language specification defines its own syntax. A Dart program is composed of − Your First Dart Code Let us start with the traditional “Hello World” example − The main() function is a predefined method in Dart. This method acts as the entry point to the application. A…
-
Environment
This chapter discusses setting up the execution environment for Dart on the Windows platform. Executing Script Online with DartPad You may test your scripts online by using the online editor at https://dartpad.dev/. The Dart Editor executes the script and displays both HTML as well as console output. The online editor is shipped with a set of…