t***@csfb.com
2003-07-17 09:43:42 UTC
Question for the more advanced LPC coders:
I can reference a global string variable 'x' within a closure like
this:
f = lambda( ({}),({#'write,({#'x}) }) );
Then
funcall(f);
write()s the value of x.
Is it possible to dynamically specify the name of the variable ie "x"
in the above expression, using symbol_function() or quote() or another
EFUN?
I've tried all the possible methods I can think of but none seem to
work.
My gut feeling is it's not possible. Can anyone prove me wrong? :)
Cheers, T
I can reference a global string variable 'x' within a closure like
this:
f = lambda( ({}),({#'write,({#'x}) }) );
Then
funcall(f);
write()s the value of x.
Is it possible to dynamically specify the name of the variable ie "x"
in the above expression, using symbol_function() or quote() or another
EFUN?
I've tried all the possible methods I can think of but none seem to
work.
My gut feeling is it's not possible. Can anyone prove me wrong? :)
Cheers, T