Is there *Any hope, that there will be a similar function in GT.M ?
GT.M has $ZBIT*() functions. What does $ZBOOLEAN do?
I could suggest to look into the Cache documentation, but essentially it is similar to $ZBIT*, except, that it works on numbers, while the $ZBIT* function work on bit strings.
We on the GT.M team stay away from competing products and their documentation to make sure that we are clean with respect to intellectual property issues. We can certainly read specifications for desired new GT.M functionality that are posted in an unrestricted public forum such as a Source Forge forum or comp.lang.mumps.
By the sound of it, a $ZBOOLEAN sounds from your posting like a straightforward implementation. Especially since this is open source software, ultimately it gets down to making the business case.
I'll explain my proposition by a simple example :
s x=1+2+4+8 ;(which is 1111 binary)
s y=1+4+16 ;(10101)
5 ; this is 101 bin.
31 ;this should be 11111
I would implement the classical operators "AND" "OR" "XOR" and "NOT", the last one with one parameter less, of course.
I tried to solve this by converting the numbers to bit maps, and using the $zbit* functions, but this is *really slow and ugly.
Any comment ? Dear World, speak to me.
GT.M integrates C and M very well. Until such time as $ZBOOLEAN is implemented in GT.M (which depends on being able to make the business case for it), you can do this easily by calling out to a small C routine.
Log in to post a comment.