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 returnstrueif they are equal, andfalseotherwise. - Inequality Operator
!=: compares two values and returnstrueif they are not equal, andfalseif they are equal. - Greater Than
>: compares two values and returnstrueif the left operand is greater than the right operand, andfalseotherwise. - Less Than
<: compares two values and returnstrueif the left operand is less than the right operand, andfalseotherwise. - Greater Than or Equal
>=: compares two values and returnstrueif the left operand is greater than or equal to the right operand, andfalseotherwise. - Less Than or Equal
<=: compares two values and returnstrueif the left operand is less than or equal to the right operand, andfalseotherwise.
> 1 == 1
true
> :hello != :hello
false
> 56 < 35
false