meaning of Mod ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

meaning of Mod ?

Peter J Etheridge
Dear Erlangers,
In module server1 at the top of Joe's book on page 363 is;

start(Name, Mod)  ->

In this context, what is the meaning of 'Mod' ?

Thank you in advance,
peter


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
by
Reply | Threaded
Open this post in threaded view
|

Re: meaning of Mod ?

by
I believe the ‘Mod’ means the real server(module) the program trying to start.

You can see a module name_server(.erl) on this page.

And the practice runs with:
1> server1:start(name_server, name_server).

Best Regards,
Yao Bao

在 2019年2月16日,13:00,Peter J Etheridge <[hidden email]> 写道:

Dear Erlangers,
In module server1 at the top of Joe's book on page 363 is;

start(Name, Mod)  ->

In this context, what is the meaning of 'Mod' ?

Thank you in advance,
peter

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: meaning of Mod ?

Joe Armstrong-2
In reply to this post by Peter J Etheridge
Mod is an atom containing the name of a module.

It gets used twice in server3.erl in the lines

     Mod:init()
and
    Mod:handle(Request, OldState)

Have fun

/Joe


On Sat, Feb 16, 2019 at 6:00 AM Peter J Etheridge <[hidden email]> wrote:

>
> Dear Erlangers,
> In module server1 at the top of Joe's book on page 363 is;
>
> start(Name, Mod)  ->
>
> In this context, what is the meaning of 'Mod' ?
>
> Thank you in advance,
> peter
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: meaning of Mod ?

Peter J Etheridge
Thank you for the clarification, Joe.
happy coding,
peter

----- Original Message -----
From:
"Joe Armstrong" <[hidden email]>

To:
"Peter J Etheridge" <[hidden email]>
Cc:
"Erlang" <[hidden email]>
Sent:
Sat, 16 Feb 2019 13:15:13 +0100
Subject:
Re: [erlang-questions] meaning of Mod ?


Mod is an atom containing the name of a module.

It gets used twice in server3.erl in the lines

Mod:init()
and
Mod:handle(Request, OldState)

Have fun

/Joe


On Sat, Feb 16, 2019 at 6:00 AM Peter J Etheridge <[hidden email]> wrote:
>
> Dear Erlangers,
> In module server1 at the top of Joe's book on page 363 is;
>
> start(Name, Mod) ->
>
> In this context, what is the meaning of 'Mod' ?
>
> Thank you in advance,
> peter
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions