The Include keyword for ABAP, import for Java, include for C, and C4C ABSL I

Source: Internet
Author: User

Abap

Using the keyword repeatedly to introduce an include program will report syntax error:

The reason for this is that ABAP has a slightly different implementation of the INCLUDE keyword and other programming languages, which simply replaces all the source code of the include program with the one that is part of the incl in the original application, so it repeatedly introduces an include Program will error.

It is worth mentioning that the ABAP report quietly include a number of standard program, such as <sysini>

Therefore, if you repeat the introduction again, you will encounter a syntax error.

Import in Java

Java import and ABAP include keyword implementation of the effect is not the same, in Java using Import to introduce the package name can let the program ape less dozen words, such as comparing the 13th and 15th lines of the wording, obviously the former should be concise.

Because import introduces the package name and does not introduce the package's source code into the source program that uses import like ABAP, you can repeat the import. Just after the. Class decompile generated by the Java compiler, you will find that the compiler automatically removes the redundant import and introduces the new package Java.io.printStream automatically:

Include in C

In the book "C Program Design", rectification mentioned that when the compiler preprocessing, the # include command is "file contains processing": Copies the entire contents of the Include header file to # include.

Then the include C language is similar to the ABAP keyword include.

Example: A.C include standard <stdio.h>:

Location of this header file:/usr/include

Inside are some macro definitions and function declarations:

There is no include this header file in B.C:

Therefore, the size of the execution file generated by the B.C compilation is less than A.C:

Import in C4C ABSL

Import with Java will not have any effect on the ABAP code generated by the background.


To get more original Jerry's technical articles, please follow the public number "Wang Zixi" or scan the QR code below:

The Include keyword for ABAP, import for Java, include for C, and C4C ABSL I

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.