Introduction
The data types used in Dark Elixir programming language are as follows
Data Types
- Number: Numeric values which are either Integer or Floating point numbers
- Null: Placeholder value for nothing
- Atom: An atom is a constant whose value is its own name
- Function: Anonymous functions which takes in arguments and returns a value
- String: A collections of characters
- Boolean: Boolean values of true or false
- Tuple: Tuple is a fixed size container for multiple elements
Relational Operators
Relational operators are used in programming languages to compare values and determine the relationship between them. These operators are commonly used in conditional statements and loops to make decisions based on the outcome of the comparison.
- Equality operator
==
: compares two values and returnstrue
if they are equal, andfalse
otherwise. - Inequality Operator
!=
: compares two values and returnstrue
if they are not equal, andfalse
if they are equal. - Greater Than
>
: compares two values and returnstrue
if the left operand is greater than the right operand, andfalse
otherwise. - Less Than
<
: compares two values and returnstrue
if the left operand is less than the right operand, andfalse
otherwise. - Greater Than or Equal
>=
: compares two values and returnstrue
if the left operand is greater than or equal to the right operand, andfalse
otherwise. - Less Than or Equal
<=
: compares two values and returnstrue
if the left operand is less than or equal to the right operand, andfalse
otherwise.
> 1 == 1
true
> :hello != :hello
false
> 56 < 35
false