[apluslist] Accessing local variables out of stack?

Eric Yeh eric.yeh at db.com
Wed Sep 7 20:15:59 EDT 2005


Hello,

This question has been troubling me for many years, and I was wondering if anyone on the list might be able to help.

Is there any way to access local variables from below you on the stack?  I have written helper functions that effectively allow me to pass up the stack, but it would be cleaner if I could retrieve them directly -- for example from some hidden context.

E.g.:

definedfunc1{x}: { z gets 2; definedfunc2{x} }
definedfunc2{x}: { x+_getVarFromLastFunction{`z} }

I would like some function _getVarFromLastFunction that would result in definedfunc1{1} returns 3.  Even better if it takes another argument that tells how many steps down the stack I want to share.

I know it may not seem clear why this power would be helpful (or indeed why it would not be bad form!), but I do suggest it would add a layer of power/cleanliness for my A+ utility library.

Thanks,
Eric

Eric Yeh
Vice President
MB Volatility Arbitrage
Deutsche Bank
280 Park Avenue
New York, NY 10017
212-454-6578



--

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.




More information about the apluslist mailing list