Importing modules
Use the IMPORT ...
instruction to import BDL,
C or Java external modules in the current module.
The IMPORT {JAVA|FGL}
instruction can be used to declare
the usage of an external module. All (public) symbols of the external module can be referenced
in the current module.
Note: The
IMPORT {JAVA|FGL}
instruction must be the first
instruction in the current module. If you specify this instruction after DEFINE
,
CONSTANT
or GLOBALS
, fglcomp will report a
syntax error.The
IMPORT {JAVA|FGL}
instruction can import a compiled
Genero module, a Java class or a C extension
library:
IMPORT FGL modulename
: Imports a Genero module implementing functions, reports, types and variables.IMPORT JAVA classname
: Imports a Java class or class element.IMPORT libname
: Imports a C extension implementing functions and variables.
The name specified after the
IMPORT FGL
or IMPORT JAVA
instruction is case-sensitive; program module (.4gl) or Java class must exactly
match the file name. Note: For backward compatibility, C extension library names specified after
IMPORT
are converted to lowercase by the compiler (therefore, we recommend you to
use lowercase file names for C extensions). A character case mismatch will be detected on UNIX™ platforms, but not on Windows® where the file system is not case-sensitive. Regarding the usage of imported symbols
in the rest of the code (not in the IMPORT
instruction): C extensions and Genero
symbols are case-insensitive, while Java symbols are case-sensitive.