Bitwise operations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bitwise operations

Jeff Hennick-3

In translating CMS Pipelines to NetRexx, I have come across a need to do "bitwise OR,"  "bitwise AND," and "bitwise exclusive OR" on Rexx strings.  (This is in the combine stage.  It is one of the last stages yet to be translated.)

These operators, of course, are not built into NetRexx, but are in Java as &, |, and ^.  I don't see how I can use these operators directly from NetRexx, nor can I find any published Java methods that implement these operations.

So how, short of writing, in Java, my own class and methods that could be called from NetRexx, can I do bitwise logic in NetRexx.

Thanks for helping me in my blindness.

Jeff


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Bitwise operations

rvjansen
Hi Jeff,

have a look at the do binary … end construct, that enables bitwise operators.

René.


On 10 Jul 2020, at 21:39, Jeff Hennick <[hidden email]> wrote:

In translating CMS Pipelines to NetRexx, I have come across a need to do "bitwise OR,"  "bitwise AND," and "bitwise exclusive OR" on Rexx strings.  (This is in the combine stage.  It is one of the last stages yet to be translated.)

These operators, of course, are not built into NetRexx, but are in Java as &, |, and ^.  I don't see how I can use these operators directly from NetRexx, nor can I find any published Java methods that implement these operations.

So how, short of writing, in Java, my own class and methods that could be called from NetRexx, can I do bitwise logic in NetRexx.

Thanks for helping me in my blindness.

Jeff

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/