Erlang/OTP Forums

Author Message

<  Erlang  ~  set up an erlang environment

freak131
Posted: Sun Dec 20, 2009 2:18 pm Reply with quote
Joined: 19 Dec 2009 Posts: 5
Hello,

what's the best way to programm erlang ?

can i write .erl files with gedit or etc. and compile them ?


erl PATHNAME doesn't work.

how can i compile the erl files ? whats about linking ?


normal times i just programm C# and PHP [....]


thank you very much and sorry for my bad english
View user's profile Send private message
zajda
Posted: Sun Dec 20, 2009 6:34 pm Reply with quote
User Joined: 22 Aug 2009 Posts: 83
hi!

the best editor for erlang would be emacs with erlang-mode: http://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html

If you prefer more graphical style editors there is Erlide http://erlide.sourceforge.net/ based on eclipse.

To compile erl files from shell use 'erlc' (make sure that Erlang/OTP is correctly compiled and installed).

You can also use makefiles (Emakefile) described here: http://www.erlang.org/doc/man/make.html

To learn basic programs use c(filename) command from command line of a VM (once inside).
View user's profile Send private message
freak131
Posted: Sun Dec 20, 2009 8:31 pm Reply with quote
Joined: 19 Dec 2009 Posts: 5
thank you a lot!,

now i have a .beam file. how can i run this file ?

// edit:

i found the function escript


>> escript main.beam

but it didn't start the main function ....

Code:
-module/main).
-export([main/1, start/0]).

-main(Var) ->
"main".

start() ->
"start".
View user's profile Send private message
Urbank
Posted: Sun Dec 20, 2009 10:28 pm Reply with quote
Joined: 20 Dec 2009 Posts: 4
There is no special main function in Erlang.
You need to say which function to call.
One way of doing this is explained at
http://www.erlang.org/quick_start.html.

Just start erlang (say with erl) and try:
Code:

1> main:start().

to call start in the module main.
(Make sure you are in the directory where your beam file is when you start erl so it will find the file.)
View user's profile Send private message
wuji
Posted: Sat Sep 15, 2012 5:28 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
JCPenney and Chrysler, though, decided not to buy airtime during the episode. episode. designer replica *beep* episode. Wendy's decided not to advertise on "The Ellen Show" at all.A
has changed since the day that show first aired.JCPenney has tapped DeGeneres DeGeneres cheap authentic jordans DeGeneres as its spokeswoman and supported its decision even when One Million
a "pro-family advocacy" group, threatened to boycott the national retail chain for for [h3]cheap Ralph Lauren[/h3] for refusing to fire her.In 1996, a Gallup poll showed that the
approval rating for gay marriage was 27 percent. It is more than than [h4]discount designer *beep*[/h4] than 50 percent today.And there are now 34 shows featuring gay characters
leading and supporting roles -- not including reality TV -- compared to to cheap replica *beep* to only 11 shows in 1997.In the "20/20" interview, DeGeneres said she
willing to risk people knowing."I decided this was not going to be be [h4]cheap Ralph Lauren Polo[/h4] be something that I was going to live the rest of my
View user's profile Send private message
dongdongwu
Posted: Wed Sep 19, 2012 7:45 am Reply with quote
User Joined: 19 Sep 2012 Posts: 236
Girls would refuse to even leave their replicas behind. specifically when the product beats the complete meaning of the Christian Louboutin men outlet; in conditions of good quality and detailing.If Cinderella was residing in your twenty primary century as opposed to the aged a single then there would not be any 'Happy actually after'. properly appears like girls nowadays are as well fond of the strong;Christian Louboutin Men Shoes to leave them in your center of nowhere.Christian Louboutin for men Shoes would arrive true handy being a excellent handbag using the glimpse and really feel belonging to the authentic but at a very much lesser price tag adding as very much as types picture in your process.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum