- Subject: [slang-users] 2 questions about referencing
- From: Laurent Perez <Laurent.Perez@xxxxxxxxxxxxxxxxx>
- Date: Wed, 23 Mar 2005 09:16:14 +0100
Hi ,
I've got two questions about object referencing.
1 - Is there any way to get a reference to a binary operator in slang-1
or do I need to write a fonction like (to stay consistant with slang-2) :
define _op_plus(x, y)
{
return x + y;
}
.
.
.
f = __get_reference("_op_plus");
2 - Getting a reference to a keyword (sqr, exch...) return NULL in
slang-1 and something usefull for some keywords in slang-2 :
abs -> &abs
and -> NULL
chs -> &chs
exch -> NULL
mod -> NULL
not -> NULL
or -> NULL
pop -> NULL
shl -> NULL
shr -> NULL
sign -> &sign
sqr -> &sqr
xor -> NULL
slang-2 define new intrinsics for binary operators (_op_and, _op_mod...),
but what about " pop, exch... " ? Is there something planned or is it
better to write a function like :
define _exch () { exch (); }
Thanks for your help.
_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]