slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] 2 questions about referencing


* 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]