In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to use only bit operations in ABAP to achieve adirecb, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.
Implementation code:
REPORT zint.PARAMETERS: a TYPE int4 OBLIGATORY DEFAULT 100, b TYPE int4 OBLIGATORY DEFAULT 100. DATA: threshold TYPE int4.FORM add USING a TYPE int4 b TYPE int4 CHANGING cv_result TYPE int4. DATA: n TYPE int4 VALUE 0, c TYPE int4 VALUE 0. DATA: i TYPE int4 VALUE 1. DATA: boolean_a TYPE abap_bool, boolean_b TYPE abap_bool, _ a TYPE int4, _ b TYPE int4, aa TYPE int4, bb TYPE int4. DATA (wrapper_one) = zcl_integer= > value_of (1). DATA (wrapper_c) = zcl_integer= > value_of (c). Aa = a. Bb = b. WHILE I
< threshold. DATA(wrapper_a) = zcl_integer=>Value_of (aa). DATA (wrapper_b) = zcl_integer= > value_of (bb). Boolean_a = boolc (wrapper_a- > and (wrapper_one)-> get_raw_value () EQ 1). Boolean_b = boolc (wrapper_b- > and (wrapper_one)-> get_raw_value () EQ 1). _ a = COND int4 (WHEN boolean_a EQ abap_true THEN 1 ELSE 0). _ b = COND int4 (WHEN boolean_b EQ abap_true THEN 1 ELSE 0). Wrapper_a = zcl_integer= > value_of (a). Wrapper_b = zcl_integer= > value_of (_ b). Wrapper_c = zcl_integer= > value_of (c). DATA (_ n_wrapper) = wrapper_a- > xor (wrapper_b)-> xor (wrapper_c). DATA (b_or_c) = wrapper_b- > or (wrapper_c). DATA (b_and_c) = wrapper_b- > and (wrapper_c). DATA (_ c_wrapper) = wrapper_a- > and (b_or_c)-> or (b_and_c). C = _ clockwrapper-> get_raw_value (). DATA (_ n_i0_wrapper) = zcl_integer= > value_of (COND int4 (WHEN _ naughwrapper-> get_raw_value () > 0 THEN i ELSE 0)). DATA (wrapper_n) = zcl_integer= > value_of (n). N = wrapper_n- > or (_ n_i0_wrapper)-> get_raw_value () Wrapper_a = zcl_integer= > value_of (aa). Aa = wrapper_a- > shift_right ()-> get_raw_value (). Wrapper_b = zcl_integer= > value_of (bb). Bb = wrapper_b- > shift_right ()-> get_raw_value (). Cv_result = n. DATA (wrapper_i) = zcl_integer= > value_of (I). Wrapper_i- > shift_left (). I = wrapper_i- > get_raw_value (). ENDWHILE.ENDFORM.START-OF-SELECTION. DATA: i TYPE int4. Threshold = ipow (base = 2 exp = 30). PERFORM add USING a b CHANGING i. WRITE: / i.
The above content is how to use only bit operations to implement axib in ABAP. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.