Atom generation

Bengt Kleberg Bengt.Kleberg@REDACTED
Thu Dec 4 14:09:33 CET 2003


Chenniappan,Dhanasekaran [DBA] wrote:
> hi,
>  I have a process that has to be created as multiple instances and register
> with different names, Now my problem is i am not able to craete the process
> names on runtime for register(Atoms like proc1,proc2,...). Please help me in
> this process.

1 make sure that the number of processes is bounded since there is an 
upper limit on the number of atoms in the system. the limit is large 
(hundreds of thousands), but it exists.

2 do this:
Nr = erlang:integer_to_list( N ),
Atom = erlang:list_to_atom( lists:append( "proc", Nr ) ),



bengt




More information about the erlang-questions mailing list