Import

Loads a userlib's declarations (a .decls file), such as the runtime the program uses

Keywords

Parameters & Returns

Parameters

This function takes no parameters.

Returns

Void

Quick Summary

Loads a userlib's declarations (a .decls file), such as the runtime the program uses

Technical Exegesis...

Loads a userlib's declarations. Syntax is Import "name.decls", which reads userlibs/name.decls: the functions it lists can then be called from the program, and the DLL it names is loaded when the program starts (and copied beside it when it is built). Import is how a program picks its runtime, so every program imports one, near the top:

BBRuntime64.decls - Desktop (DX12)
BBRuntimeVulkan.decls - Desktop (Vulkan)
BBRuntimeWeb.decls - Web (WebGPU)
BBRuntimeWebGL2.decls - Web (WebGL2)

Example

Example.bam
Import "BBRuntime64.decls"

Function Main()
    Print "Hello"
    Return False
EndFunction