[erlang-questions] Invoking a function based on name only

Dustin Sallings dustin@REDACTED
Fri Sep 14 01:01:45 CEST 2007


On Sep 13, 2007, at 15:42 , Kevin A. Smith wrote:

> If I have the name of the function and the module it belongs to, how
> can I invoke it? I tried cobbling together erl_scan and friends but
> the embedded macros in the code gave me some heartburn. Any pointers?

1> apply(list_to_atom("erlang"), list_to_atom("now"), []).
{1189,724492,627140}

-- 
Dustin Sallings





More information about the erlang-questions mailing list