[erlang-questions] "function password_generator/0 undefined" <--- Having a n00b moment.

Samuel Elliott <>
Wed Mar 28 23:46:20 CEST 2012


On Wed, Mar 28, 2012 at 9:15 PM, Yves S. Garret
<> wrote:
> I thought that one of the things that I can do with methods in Erlang is use
> the ';' in order to  cycle through a number of different input types for
> methods.

You're correct, however two functions are different functions if their
arity is different.

You'd use a semicolon between the different inputs to foo/2, but
that's a completely different function to foo/1 so you use a dot
between the two functions themselves.

I hope that's clear, if it's not, I'm sure someone else on the list
will have a far clearer explanation than I can manage.

Sam
>
> I think I might have forgotten some parts of this works :-) .
>
> *starts digging up his Erlang book*
>
>
> On Wed, Mar 28, 2012 at 2:54 PM, Gleb Peregud <> wrote:
>>
>> On Wed, Mar 28, 2012 at 20:48, Yves S. Garret
>> <> wrote:
>> > I'm trying to get back into Erlang and figured I'd try this example,
>> > just
>> > for my own amusement and scant benefit.
>>
>> Take a look at a semicolon at the end of the first clause. There
>> should be a dot instead
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Samuel Elliott

http://lenary.co.uk/
+44 (0)7891 993 664



More information about the erlang-questions mailing list