[erlang-questions] what is the correct syntax to spawm a MFA with no arguments?

Jarrod Roberson jarrod@REDACTED
Wed Apr 30 23:02:00 CEST 2008


On Wed, Apr 30, 2008 at 3:27 PM, Matthew Dempsky <matthew@REDACTED>
wrote:

> 2008/4/30 Jarrod Roberson <jarrod@REDACTED>:
> > I have also tried spawn(?MODULE, loop, []) and I get a warning that
> loop/0
> > is unused.
>
> You need to add loop/0 to -export.
>

thanks that stopped the warning, and it actually works!
I thought the idea of that example is to _hide_ the loop/0 method since it
is an implementation detail
now that there is a start/0 function?
I guess my question to the group is; is there anyway to get this to work
without having to -export loop/0?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080430/e27fed5a/attachment.htm>


More information about the erlang-questions mailing list