[erlang-questions] What is the function be defined as BIF?

Tue Nov 27 07:50:45 CET 2007


start(Name,Mod)->register(spawn(fun()->loop(Name,Mod,Mod:init()) end)).

Eshell V5.5.5  (abort with ^G)
./genserver.erl:4: function register/1 undefined

modify the register to  erlang:register
start(Name,Mod)->erlang:register(spawn(fun()->loop(Name,Mod,Mod:init()) end)).

10> c(genserver).

The register function is BIF ? 
And the spawn function is BIF? 
All of erlang:* is BIF?
When we need specify a prefix erlang:* ?
Why the most of example does not using erlang:register?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071127/ad826329/attachment.htm>

More information about the erlang-questions mailing list