Dynamically load of modules

10 views
Skip to first unread message

Humberto Rodríguez Avila

unread,
Jul 7, 2015, 9:43:27 AM7/7/15
to erlan...@googlegroups.com
Hello,

Could be possible load to the runtime a module without to put it in a .erl file? In other words, do it in a programmatically way?

For example 

demo.erl
------------------------------------------

-module (demo).
-export ([double/1]).

double (X) ->
2 * X.


Could I do that without write the source file?

Thanks in advance!

Humberto
 

Jordan Wilberding

unread,
Jul 7, 2015, 11:02:09 AM7/7/15
to erlan...@googlegroups.com
This may be what you are looking for: http://www.erlang.org/doc/man/code.html#load_binary-3

--
You received this message because you are subscribed to the Google Groups "erlangcamp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erlangcamp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Merritt

unread,
Jul 7, 2015, 11:15:14 AM7/7/15
to erlan...@googlegroups.com

Humberto Rodríguez Avila

unread,
Jul 7, 2015, 11:21:54 AM7/7/15
to erlan...@googlegroups.com
Thanks, I will try with these examples!

- Humberto

Humberto Rodríguez Avila

unread,
Jul 7, 2015, 11:48:26 AM7/7/15
to erlan...@googlegroups.com
Thanks for your help!

The solution is good for me!

See you
Reply all
Reply to author
Forward
0 new messages