Imports

In Odin, there are two types of a imports: import and import_load. In Odin, every file is scope/namespace. A file's scope has special visibility rules which will be explained later. The filename of an import is relative to that current file, except for the core library files.

import

The most common kind of import that is used in Odin is import. It is constructed using the following syntax:

import "fmt.odin";

This will create a "type name" fmt that is local to this file's scope. A custom name can be provided if wanted rather than the default name generated from the file name (or if the file name is not a valid identifier).

import slf "some_very_long_file_name.odin";

import_load

results matching ""

    No results matching ""