Erlang -- Introduction

User's Guide
PDF
Top

Getting Started with Erlang
User's Guide
Version 5.8.5

Expand All
Contract All

Chapters

- Introduction
  - Top of chapter
  - Introduction
  - Things Left Out
- Sequential Programming
  - Top of chapter
  - The Erlang Shell
  - Modules and Functions
  - Atoms
  - Tuples
  - Lists
  - 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
  - Timeouts
  - 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

### 1.1 Introduction

This is a "kick start" tutorial to get you started with Erlang. Everything here is true, but only part of the truth. For example, I'll only tell you the simplest form of the syntax, not all esoteric forms. Where I've greatly oversimplified things I'll write *manual* which means there is lots more information to be found in the Erlang book or in the Erlang Reference Manual.

I also assume that this isn't the first time you have touched a computer and you have a basic idea about how they are programmed. Don't worry, I won't assume you're a wizard programmer.

### 1.2 Things Left Out

In particular the following has been omitted:

- 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/or software written in other languages (ports). There is however a separate tutorial for this, Interoperability Tutorial
- Very few of the Erlang libraries have been touched on (for example file handling)
- OTP has been totally skipped and in consequence the Mnesia database has been skipped.
- Hash tables for Erlang terms (ETS)
- Changing code in running systems