Asfak's Blog

Erlang-Coding – 001. How to install and write code

Advertisements

1. Go to http://www.erlang.org/download.html

2. Download Erlang binary for windows.

3. Install Erlang and you will get something in your start menu like Erlang OTP RNNB where you will find erlang shell and erlang documentation.

4. Say you installed Erlang at default directory. In my case it is C:\Program Files\erl5.6.2. There you will find a directory C:\Program Files\erl5.6.2\bin. Enter into it.

5. Create a text file named helloWorld.erl there.

6.  write the following code there

-module(helloWorld.erl).
-export([myFun/0]).

myFun () -> io:format (“Hello World ~n”, []).

7.  double click on erl.exe in the same directory i.e. C:\Program Files\erl5.6.2\bin.

8. Now do the following

9. This is the hello world program. Enjoy! erlang.
10. Go to the start menu -> erlang -> documentaton. Enter into Erlang Programming -> Getting Started.

11. Go through all the things and write and run code like the above.

Advertisements

Advertisements