使用 ABAP 进行位移 [英] Bit shifts with ABAP

查看:30
本文介绍了使用 ABAP 进行位移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一些需要算术和逻辑位移的 Java 代码移植到 ABAP.据我所知,ABAP 只支持按位 NOT、AND、OR 和 XOR 运算.

I'm trying to port some Java code, which requires arithmetic and logical bit shifts, to ABAP. As far as I know, ABAP only supports the bitwise NOT, AND, OR and XOR operations.

有谁知道用 ABAP 实现这种转变的另一种方法?是否有可能只使用 NOT、AND、OR 和 XOR 运算来获得与移位相同的结果?

Does anyone know another way to implement these kind of shifts with ABAP? Is there perhaps a way to get the same result as the shifts, by using just the NOT, AND, OR and XOR operations?

推荐答案

现在可以在这里找到更新的代码:github 要点

the updated code can now be found over here: github gist

这篇关于使用 ABAP 进行位移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆