Skip to content

Import command

Alvin Cheng edited this page Jan 9, 2023 · 1 revision

Description

This is the import command, this command will import a variable, array or function from another file that is exported by the export command. The command will accept an argument of the file to import from. Please note that all the variables in the export list are available.

Notice

Please note that this command is accessing your file system so the OS may ask for your permission(MacOS especially). Please grant permission to the executable to have access to your files, or else this command will fail.

Example

main.chat:

import "./file.chat";

# $VARIABLE can now be used here!

file.chat:

$VARIABLE = "<VALUE>";
export $VARIABLE;

Clone this wiki locally