Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

importimportImportImportimport (Operator)

Name

importimportImportImportimport — Import one or more external procedures.

Signature

import( : : ProcedureSource : )

Herror import(const char* ProcedureSource)

Herror T_import(const Htuple ProcedureSource)

void Import(const HTuple& ProcedureSource)

static void HOperatorSet.Import(HTuple procedureSource)

def import(procedure_source: str) -> None

Description

The importimportImportImportImportimport statement can be used to import additional external procedures from within a HDevelop program. The imported procedures become only available for the procedure that contains the importimportImportImportImportimport statement but not for other procedures.

importimportImportImportImportimport statements may occur in any line of a procedure. The imported procedures become only available below the importimportImportImportImportimport statement and may be overruled by later importimportImportImportImportimport statements.

proc() * unresolved procedure call import ./the_one_dir proc() * resolves to ./the_one_dir/proc.hdvp import ./the_other_dir proc() * resolves to ./the_other_dir/proc.hdvp

The parameter ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source points to the source of the external procedures. It can either be the path of a directory that contains the procedures and/or the procedure libraries to be used or directly the file name of a procedure library. In both cases, the path may either be absolute or relative. In the latter case, HDevelop interprets the path as being relative to the file location of the procedure that contains the importimportImportImportImportimport statement. The path has to be in quotes if it contains one or more spaces, otherwise the program line will become invalid.

Contrary to system, user-defined, and session directories HDevelop looks only in the directory specified by an importimportImportImportImportimport statement for external procedures but not recursively in its subdirectories.

Note, that an importimportImportImportImportimport statement is never executed and, therefore, ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source has to be evaluated already at the procedure's loading time. Therefore, ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source has to be a constant expression, and, in particular, it is not possible to pass a string variable to ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source.

However, ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source may also contain environment variables, which HDevelop resolves accordingly. Environment variables, regardless of the platform actually used, must always be denoted in Windows syntax, i.e., %VARIABLE%.

importimportImportImportImportimport neither tests whether the path ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source exists nor whether it points to a procedure library or a directory that contains procedures at all. Therefore, importimportImportImportImportimport statements with nonexistent or pointless paths nonetheless stay valid program lines, in any case.

Import paths are listed separately in HDevelop's procedure settings. Of course, these paths can't be modified or deactivated from within the procedure settings. Furthermore, procedures that are available only via an importimportImportImportImportimport statement are marked with a special icon.

In the program listing, import statements are displayed and must be entered without parenthesis in order to emphasize that the line is a declaration and not an executable operator.

Parameters

ProcedureSourceProcedureSourceProcedureSourceProcedureSourceprocedureSourceprocedure_source (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

File location of the external procedures to be loaded: either a directory or a procedure library

Result

importimportImportImportImportimport is never executed.

Module

Foundation