BEAM implementation questions

Vladimir Sekissov svg@REDACTED
Wed Jan 26 12:24:18 CET 2005

Good day,

thomasl_erlang> > > I'd like support for this, perhaps even moreso if
thomasl_erlang> > > there was some language support for declaring
thomasl_erlang> > > "constant data".

But you can use parameterized modules to emulate this.

-module(t, [Data]).


gv(Idx) ->
  proplists:get_value(Idx, Data).

1> T=t:new([{a, b}, {c, d}]).

2> T:gv(a).

3> file:write_file("T.dump", term_to_binary(T)).

1> l(t).

2> {ok, B} = file:read_file("T.dump").

3> T=binary_to_term(B).

4> T:gv(a).

Best Regards,
Vladimir Sekissov

More information about the erlang-questions mailing list