Skip to content

import

The import keyword is the replacement for the #include<> directive. Symbols external to a translation unit can be imported using the import keyword without any collisions.

Syntax

import std;
import std.print;

Example Code

To import libraries to programs:

import std;
import std.print;

int32 main() 
{
    std::print("Hi, world!");
    return 0;
}