![]() |
![]() |
![]() |
![]() |
![]() |
The statement makes it possible to reuse all or some of the definitions specified in the module definitions part of a different module.
The keyword recursive means that every definition required by the specified definitions must also be imported. It can only be used with selective import.
Related keywords:
1. Importing everything from a module
import from module_identifier [.objid(object_identifier) ] [ language "language_identifier" ] all; |
import from is a keyword of two parts, they together introduce the import definition.
module_identifier is the name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore characters.
|
language"language_identifier" is used when definitions are imported from sources other than TTCN-3 modules to denote the language (=language_identifier) of that source.
all means that every definition must be imported from the source.
import from Ce_mod all;
All definitions from the module Ce_mod will be imported.
import from Ia_mod.objid{0 4 0 127 5 0} all;
All definitions will be imported from the module Ia_mod with the object identifier 0.4.0.127.5.0 in the module name.
import from Muj_mod language "ASN.1:2002" all;
All definitions from the module Muj_mod written in the 2002 version of ASN.1 will be imported.
Selective import is not implemented. When encountered in the TTCN-3 program, it will be treated as a statement for importing all definitions. |
import from module_identifier [.objid(object_identifier) ] [ language "language_identifier" ] all except {exception_list}; |
import from is a keyword of two parts, they together introduce the import definition.
module_identifier is the name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore characters.
|
language "language_identifier" is used when definitions are imported from sources other than TTCN-3 modules to denote the language (=language_identifier) of that source.
all means that every definition must be imported from the source.
import from Min_mod all except {testcase tc_one, tc_deux; function f_tre()};
All definitions from the module Min_mod will be imported except the test cases tc_one and tc_deux as well as the function f_tre().
import from module_identifier [.objid(object_identifier) ] [ language "language_identifier" ] [ recursive ] {importation_list}; |
import from is a keyword of two parts, they together introduce the import definition.
module_identifier is the name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore characters.
|
language "language_identifier" is used when definitions are imported from sources other than TTCN-3 modules to denote the language (=language_identifier) of that source.
recursive means that every definition required by the specified definitions must also be imported.
import from Mon_Mod {const c_derde, c_fjaerde; var v_cinquieme; template all};
The constants c_derde and c_fjaerde as well as the variable v_cinquieme together with all templates will be imported from the module Mon_mod.
import from Mon_Mod recursive {const c_hetedik};
The constant c_hetedik will be imported from the module Mon_mod along with the definitions required by c_hetedik.
3. Importing of import statements
import from module_identifier [.objid(object_identifier) ] [ language "language_identifier" ] { import all; } |
import from is a keyword of two parts, they together introduce the import definition.
module_identifier is the name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore characters.
|
language"language_identifier" is used when definitions are imported from sources other than TTCN-3 modules to denote the language (=language_identifier) of that source.
import all means that every visible* import statement must be imported from the source.
import from G_mod { import all };
All visible import statements from the module G_mod will be imported. This has the same effect as if the visible import statements of module G_mod were copied into the importing module.
BNF definition of import