[erlang-questions] run program from commandprompt? define function?

Circular Function <>
Sat May 31 15:24:54 CEST 2008


-module(tut).
-export([double/1]).

double(X) ->
    2 * X.

saved that in tut.erl, placed it in the bin/ and tried to run it but it asks for a specific program to run.

Erlang (BEAM) emulator version 5.6.2 [async-threads:0]

Eshell V5.6.2  (abort with ^G)
1> c(tut).
../tut.erl:none: no such file or directory
error
2> 

so which install do i need?


how do i define a function?

can i do that directlyin the shell?

like in python:
def sq(x): return x*x

how would i dot hat in erlang?



      ___________________________________________________
Sök efter kärleken!
Hitta din tvillingsjäl på Yahoo! Dejting: http://ad.doubleclick.net/clk;185753627;24584539;x?http://se.meetic.yahoo.net/index.php?mtcmk=148783
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080531/4f6e0ff8/attachment.html>


More information about the erlang-questions mailing list