ABAP
Syntax error: include program with keyword
The reason is that the implementation of the keyword include in ABAP is a little different from other programming languages. When activating ABAP, it simply replaces the entire source code of the included program with the line include Incl in the original program. Therefore, introducing an include program repeatedly will cause an error.
It is worth mentioning that ABAP report quietly includes many standard programs, such as.
So if you introduce it again, you’ll get the same syntax error.
import in Java
The Java import keyword does not work the same way as the ABAP include keyword. Using import to introduce package names in Java saves typing. For example, line 13 and line 15 in the following figure are more concise.
Because import introduces the package name and does not introduce the package source code to the source program that uses import as ABAP does, import can be repeated. When you decompile the.class generated by the Java compiler, you’ll find that the compiler automatically removes redundant imports and introduces a new package java.io. PrintStream:
include in C
In the book C Programming written by Tan Hao-keeng, the compiler preprocesses the #include command with “file include processing” : copy all the contents of the header file to #include.
The C language include is similar to the ABAP keyword include.
Example: include the standard <stdio.h> in a.c:
The location of this header file: /usr/include
Here are some macro definitions and function declarations:
B.c does not include the header file:
Therefore, the size of the executable file generated by b.c compilation is smaller than that of a.c:
import in C4C ABSL
The same as Java import does not have any effect on the background generated ABAP code.