- Subject: Re: [slang-users] 2 questions about referencing
- From: Laurent Perez <Laurent.Perez@xxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Mar 2005 21:18:40 +0200
* John E. Davis <davis@xxxxxxxxxxxxx> [2005-03-23 12:10] :
> At the moment nothing is planned for the stack operators. Do you have
> a concrete example that illustrates the usefulness of such references?
I'm writing an RPN calculator using slang. Thanks to the stacked-based
nature of slang, it's just a matter of binding keys via the slkbi module
I wrote to functions. The easiest way I found to do this was to write a
function that bind a key to a function by getting its reference. I will
release the code soon. Anyway it doesn't enlarge / slow the code to write
something like :
define _exch () { exch (); }
The probleme also occur with unary operators "not" and "~". I was not
able to get a reference to them. Maybe should it be made possible for
consistency, but I don't have any other example than mine for which it
may be usefull. And again, it won't hurts to define something like
"_op_not" in my code.
Thanks.
Laurent.
_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]