Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the source code of NOT include

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article focuses on "how to write the source code of NOT include", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to write the source code of NOT include.

(1) from the comments section, we can see that many friends have found a breakthrough in the puzzle, that is, NOT= > NOT (NOT). This is the typical syntax for static method calls of the ABAP class, so it shows that the INCLUDE named NOT contains an ABAP class named NOT and a static method named NOT. At the same time, the Boolean logic operator OR appears in front of the static method call, and there is only one case in which the syntax check can be passed, that is, the output parameter of the NOT static method is of type RETURNING, and then the output parameter is used as the Operand of OR.

It is worth mentioning that many other programming languages prohibit the use of keyword reserved words to name identifiers or classes, while ABAP does not have this restriction, which is a bit of a maverick.

(2) some friends also mentioned in the comments section that the executable part of the code begins with IF, but does not end with ENDIF. The only explanation is that in the NOT include, the macro containing the ENDIF statement is declared and the name of the macro is named NOT.

(3) the use of exclamation points in ABAP.

The ABAP help document makes it very clear! As an escape character in ABAP, you can tell the ABAP compiler,! This is not followed by a keyword, but a plain ABAP identifier.

The example given is also clear: if someone wants to use CHANGING and USING as the name of the formal parameter, just put an exclamation point in front of it.

What if the exclamation point is not followed by a real ABAP keyword, but a normal identifier?

The answer is that the exclamation point is directly ignored. Look at the following example, the effect of adding an exclamation point is not consistent with that of adding an exclamation point.

(4) now we know that the! NOT in the title implies that you have defined a variable called NOT in NOT include.

First of all, let's remove all the tricks that deceive people's eyes from the riddle.

In the ABAP logic judgment sentence with the participation of NOT, the appearance of even number of NOT is equivalent to the absence of a single NOT (similar to the principle of negative and positive), and the appearance of odd number of NOT is only equivalent to the appearance of a NOT.

So the superfluous series of NOT in the title, just like Mr. Mo Da, the head of Hengshan in "The Smiling、Proud Wanderer", can dazzle the unknown opponent.

Known as "hide the sword in the piano, the sword sounds" great, with this dreamy sword, outside Hengshan killed one of the 13 Songshan Taibao "Da Song Yang hand" Fei Bin. Even if Wu Gong was as strong as Fei Bin, he didn't see through the false moves in Mo Da Swordsmanship. And dear ABAP consultants, have you seen through the repeated NOT tricks in this mystery?

Take a closer look at all the places where! NOT appears in the code, and after removing the excess NOT according to the above rule, you can extract two rules:

A.! there is at least one IF,OR or AND in front of the NOT

B.! NOT ends directly, and there are no judgment statements such as IS INITIAL or > XXX, XXX, etc.

What type of ABAP variable allows this operation?

The integer is not good:

String type is not good:

And SELECTION-OPTIONS can.

This SELECTION-OPTIONS is an antique feature of ABAP, which is often used by consultants who do Dynpro development under SAPGUI, but is no longer supported in the SAP Cloud Platform ABAP programming environment.

After the above four grammar points are broken through one by one, how to write the source code of NOT include, the train of thought is also clear.

The source code is as follows:

At this point, I believe you have a deeper understanding of "how to write the source code of NOT include". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report