dynamic built fun and records

Knut Bakke knutbakke@REDACTED
Fri Oct 8 16:45:48 CEST 2004


Hi,
I'm building funs runtime on R9B from pure text
strings using the following approach:

{ok,Tokens,Start}=
    erl_scan:string("fun()->testing, A=#rec{} end."), 
{ok,ExprList}=erl_parse:parse_exprs(Tokens),
{value,Fun,_}=erl_eval:exprs(ExprList,[]}.

Fun(). resuts in 'undef_record', If I remove the
record
the fun it works works.

I'm making the fun in a module that knows about #rec.

Any idea?

knut Bakke.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the erlang-questions mailing list