Caché Basic Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   

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
which is equivalent to:
MyObject = new %Library.MsgHandler
See Also

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA