Skip to content

Built in functions

Kick de Gans edited this page May 18, 2024 · 6 revisions

List of built-in functions:

In the future there will be more functions.

puts()

Write formatted output to stdout without newline.

input()

Read input from user. Arguments given are written to stdout without newline.

exit()

Exit.
int argument used as exit code.

system()

Execute a command on the system.
string argument used as command.

sleep()

Sleep for a given amount of miliseconds.
int given is miliseconds.

typeof()

Return type of value.
var used as argument for source.

open()

Open a file for reading.
string argument 1 used as source.
int argument 2 used as options.

close()

Close a file.
stream argument used as source.

read()

Read contents of a stream.
stream argument used as source.

write()

Read contents of a stream.
stream argument 1 used as source.
string argument 2 used as content.

remove()

Delete a file.
string argument used as source.

local_import()

Import a library or file to local scope
string argument used as file to import