Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section


Imports a package name.


Imports package [,package2 [,...]]


The Imports statement syntax has these parts:

package A package name, or a comma-separated list of package names.


You use the Imports statement to import a package. This allows statements to append a package name to a class without having to explicitly declare the package name each time. If the package does not exist, or if the specified class is not found in any of the imported packages, or if the specified class is found in more than one imported package, no package name is appended to the class name.


The following example illustrates the use of the Imports statement:

Imports %Library
MyObject = new MsgHandler
Copy code to clipboard

which is equivalent to:

MyObject = new %Library.MsgHandler
Copy code to clipboard

See Also