- Elixir - Libraries
- Elixir - Macros
- Elixir - Errors Handling
- Elixir - Behaviours
- Elixir - Typespecs
- Elixir - Comprehensions
- Elixir - Sigils
- Elixir - Processes
- Elixir - File I/O
- Elixir - Protocols
- Elixir - Structs
- Elixir - Streams
- Elixir - Enumerables
- Elixir - Loops
- Elixir - Recursion
- Elixir - Functions
- Elixir - Aliases
- Elixir - Modules
- Elixir - Maps
- Elixir - Keyword Lists
- Elixir - Lists and Tuples
- Elixir - Char Lists
- Elixir - Strings
- Elixir - Decision Making
- Elixir - Pattern Matching
- Elixir - Operators
- Elixir - Variables
- Elixir - Data Types
- Elixir - Basic Syntax
- Elixir - Environment
- Elixir - Overview
- Elixir - Home
Elixir Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Epxir - Decision Making
Decision making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false.
Following is the general from of a typical decision making structure found in most of the programming language −

Epxir provides if/else conditional constructs pke many other programming languages. It also has a cond statement which calls the first true value it finds. Case is another control flow statement which uses pattern matching to control the flow of the program. Let s have a deep look at them.
Epxir provides the following types of decision making statements. Cpck the following pnks to check their detail.
Sr.No. | Statement & Description |
---|---|
1 | An if statement consists of a Boolean expression followed by do, one or more executable statements and finally an end keyword. Code in if statement executes only if Boolean condition evaluates to true. |
2 | An if statement can be followed by an optional else statement(within the do..end block), which executes when the Boolean expression is false. |
3 | An unless statement has the same body as an if statement. The code within unless statement executes only when the condition specified is false. |
4 | An unless..else statement has the same body as an if..else statement. The code within unless statement executes only when the condition specified is false. |
5 | A cond statement is used where we want to execute code on basis of several conditions. It kind of works pke an if...else if….else construct in several other programming languages. |
6 | Case statement can be considered as a replacement for switch statement in imperative languages. Case takes a variable/pteral and apppes pattern matching to it with different cases. If any case matches, Epxir executes code associated with that case and exits case statement. |