Erlang -- Introduction

Getting Started with Erlang

User's Guide

Version 9.0

- User's Guide
- PDF
- Top

- Expand All
- Contract All

### Chapters

- Introduction
  - Top of chapter
  - Prerequisites
  - Omitted Topics
- Sequential Programming
  - Top of chapter
  - The Erlang Shell
  - Modules and Functions
  - Atoms
  - Tuples
  - Lists
  - Maps
  - Standard Modules and Manual Pages
  - Writing Output to a Terminal
  - A Larger Example
  - Matching, Guards, and Scope of Variables
  - More About Lists
  - If and Case
  - Built-In Functions (BIFs)
  - Higher-Order Functions (Funs)
- Concurrent Programming
  - Top of chapter
  - Processes
  - Message Passing
  - Registered Process Names
  - Distributed Programming
  - A Larger Example
- Robustness
  - Top of chapter
  - Time-outs
  - Error Handling
  - The Larger Example with Robustness Added
- Records and Macros
  - Top of chapter
  - The Larger Example Divided into Several Files
  - Header Files
  - Records
  - Macros

# 1 Introduction

This section is a quick start tutorial to get you started with Erlang. Everything in this section is true, but only part of the truth. For example, only the simplest form of the syntax is shown, not all esoteric forms. Also, parts that are greatly simplified are indicated with *manual*. This means that a lot more information on the subject is to be found in the Erlang book or in Erlang Reference Manual.

### 1.1 Prerequisites

The reader of this section is assumed to be familiar with the following:

- Computers in general
- Basics on how computers are programmed

### 1.2 Omitted Topics

The following topics are not treated in this section:

- References.
- Local error handling (catch/throw).
- Single direction links (monitor).
- Handling of binary data (binaries / bit syntax).
- List comprehensions.
- How to communicate with the outside world and software written in other languages (ports); this is described in Interoperability Tutorial.
- Erlang libraries (for example, file handling).
- OTP and (in consequence) the Mnesia database.
- Hash tables for Erlang terms (ETS).
- Changing code in running systems.