import
The import keyword brings a module or specific symbols into the current scope so they can be used by name.
Syntax & Example
import FS;
import Net;
import { HashMap } from "adesh_alloc";
import { adesh_alloc::HashMap } from "adesh_alloc";
Use Cases
- Pulling in standard library modules (
FS,Net,IO). - Importing specific symbols from a module with
from. - Aliasing imports with
asto avoid name clashes.
See also: from, as, Modules & Imports.